Kubernetes Ingress YAML Builder
An Ingress exposes HTTP and HTTPS routes from outside the cluster to Services inside it. Instead of one LoadBalancer per service, an Ingress controller terminates traffic at a single point and routes by hostname and URL path. This builder generates a valid Ingress manifest including TLS, so you can publish a service over HTTPS quickly.
How it works
The manifest uses apiVersion: networking.k8s.io/v1 and kind: Ingress. The spec.ingressClassName selects the controller. Each entry under spec.rules binds a host to one or more paths, where every path has a pathType (Prefix or Exact) and a backend.service reference giving the Service name and port.number.
For HTTPS, the spec.tls block lists the hosts covered and the secretName of a kubernetes.io/tls Secret containing the certificate and key. The controller terminates TLS for those hosts using that secret.
Tips and example
Create the TLS secret first, for example:
kubectl create secret tls my-tls --cert=tls.crt --key=tls.key
Then apply the Ingress and verify the address is assigned:
kubectl apply -f ingress.yaml
kubectl get ingress
Use Prefix paths for typical routing and reserve Exact for single endpoints. Keep one host per rule for clarity, and confirm the referenced backend Services already exist before applying.