How do I configure my DNS to work with Rancher 2.0 ingress?
I’m new to Kubernetes and Rancher, but have a cluster setup and a workload deployed. I’m looking at setting up an ingress, but am confused by what my DNS should look like.
I’ll keep it simple: I have a domain (example.com) and I want to be able to configure the DNS so that it’s routed through to the correct IP in my 3 node cluster, then to the right ingress and load balancer, eventually to the workload.
I’m not interested in this xip.io stuff as I need something real-world, not a sandbox, and there’s no documentation on the Rancher site that points to what I should do.
Should I run my own DNS via Kubernetes? I’m using DigitalOcean droplets and haven’t found any way to get Rancher to setup DNS records for me (as it purports to do for other cloud providers).
It’s really frustrating as it’s basically the first and only thing you need to do… “expose an application to the outside world”, and this is somehow not trivial.
Would love any help, or for someone to explain to me how fundamentally dumb I am and wha tI’m missing!
You aren’t dumb, man. This stuff gets complicated. Are you using AWS or GKE? Most methods of deploying kubernetes will deploy an internal DNS resolver by default for intra-cluster communication. These URLs are only useful inside the cluster. They take the form of
<service-name>.<namespace>.svc.cluster.local and have no meaning to the outside world.
However, exposing a service to the outside world is a different story. On AWS you may do this by setting the service’s ServiceType to LoadBalancer, where kubernetes will automatically spin up an AWS LoadBalancer, and along with it a public domain name, and configure it to point to the service inside the cluster. From here, you can then configure any domain name that you own to point to that loadbalancer.