1001Ferramentas
🌐Dev

Kubernetes Ingress Generator

Generates a Kubernetes Ingress with host, service and port, using the nginx ingressClassName and a root path. The TLS block is yours to add.

YAML

Ingress manifest without counting YAML levels

The Deployment is up, the Service answers inside the cluster, and now the host has to be exposed. Writing the Ingress by hand means getting rules, http, paths, backend, service, port and number nested correctly, level by level. Miss one space and kubectl returns a validation error that points at the wrong field, and you lose an afternoon to it.

The manifest produced here uses networking.k8s.io/v1, ingressClassName nginx and a single rule: the host you type, path slash with pathType Prefix, and a backend pointing at the Service name and port number. An honest warning: there is no tls block in the output, even though the tool description mentions optional TLS, and no namespace or annotations field either. The port asked for is the Service port, not the container port.

For HTTPS you add the tls section yourself, with the host list and the secretName, plus the cluster-issuer annotation if you run cert-manager. Before applying, run kubectl get ingressclass to confirm the class really is called nginx, because managed installs often rename it. A kubectl apply with a server-side dry run catches the rest. The YAML is assembled in the browser and nothing is sent anywhere.

Frequently asked questions

How do I add TLS to this Ingress?
By hand. After copying the YAML, add a tls block at the same level as rules, with a list of hosts and the secretName of the certificate. The page does not generate that part.
Which port should I enter?
The port exposed by the Service, not the container port. Run kubectl get svc and use the number shown under PORT.
My Ingress has no external address. What now?
Usually the controller is missing. Check that ingress-nginx is running and that its Service has an external IP, with kubectl get svc in the ingress-nginx namespace. Without a controller the object exists but nothing routes traffic.

Related Tools