How does one point a domain to a Kubernetes cluster?

Posted August 23, 2019 15.9k views
DigitalOceanKubernetesDigitalOcean Managed Kubernetes

I understand how kubernetes ingresses work. I understand kubernetes services are used to expose one’s deployed service(s). What I don’t understand is how to get traffic into my cluster with a DigitalOcean managed Kubernetes.

edited by AHA

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

Hi there!

Most commonly, people use services of type ‘LoadBalancer’ to get traffic into the clusters:

Once a load balancer service is created our cloud controller manager that runs on your master will notice the new service is of type 'LoadBalancer’ and provision a DO load balancer to be pointed at your DOKS nodes at the NodePort specified or generated by the service. Now any traffic that hits your LB’s IP will be routed as follows(with a few exceptions):

User Request -> DO LB -> kubernetes node -> service -> pod

That LB will have an external-facing IP where you can point all you traffic that belongs to that service. Users often create their ingress controller service as the loadbalancer type and then use ingress rules to have the ingress controller distribute traffic. This prevents users from needing a individual LB for each service.


John Kwiatkoski
Senior Developer Support Engineer

  • First off, thank you for your response this is helpful.

    So I don’t need to make an external load balancer first? Also how do I point a domain to an external DO load balancer?

No you do not need to create one first. The managed kubernetes logic will do that for you. Once it is created, you can check the LB’s IP that it was assigned(via kubectl or the DO cloud panel) and setup your domain to resolve to that LB IP.

Let me know if you have any additional questions.


John Kwiatkoski
Senior Developer Support Engineer

  • Ok, I have things setup. I followed this tutorial,, along with your articles. However the request is not getting to my pods. I can see that its getting to the load balancer, because ping will tell me the ip address. What I can’t seem to figure out is where its dropping off.

    I have the pods running.
    I have the services setup to so the cluster knows how to address the pods.
    I have the ingress setup to redirect the subdomains to the service to the pod…
    I have the internal nginx load balancer that is getting the traffic. Ping tells me…

    I don’t know where things are falling off at. I’m going to try the same config on my local cluster to see it I’m missing something.