Kubernetes Ingress

Consider I have a domain name www.saireddy.com

When ever a deployment, services deployed in kubernetes on dev namespace
eg servicename: nginx-svc, port: 80

I want an automated way to access this services on url
link www.nginx-svc.dev.saireddy.com

in the same way if I deploy a different service on uat namespace
eg servicename: tomcat, port: 8080
then it should be accessible at
link www.tomcat.uat.saireddy.com

Every time adding a ingress in yaml is a pain for dev cluster this will be super beneficial.
I wonder how kodekloud manages to do the same because when I deploy services in the lab I can instantly able to access the exposed url’s for that services with out any ingress files.

Hi @bonthusaireddy

To automate this requires the use of DNS APIs. When your cluster is hosted in Cloud, then this is fairly simple as the deployment process can include code to update DNS to point to the cluster’s ingress (eg AWS Route 53) for the new services. You can put a wildcard record into the zone saireddy.com to route all unmatched hosts to the cluster ingress if that works for you, then DNS updates aren’t needed when a new service is deployed.

You still have to add the ingress resource to associate your service with the ingress controller.

1 Like