Question

How do i figure out how to attach a domain to a kubernetes cluster

It’s not very intuitive in your “How to add a load balancer to a kubernetes cluster” on how to actually configure it after the fact. How do i configure the domain? Should I point the TXT record at the load balancer? How do I add more sub domains? I just don’t get it.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Hi, this was the tutorial I followed to set this up: https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-with-cert-manager-on-digitalocean-kubernetes

If you don’t have experience in all this, be prepared for a bit of learning and experimentation. But it’s totally worth it when you understand how all the pieces come together!

A basic outline of what you’ll need:

  • Some HTTP service running in your cluster
  • nginx ingress controller to receive external traffic and route it to your service
  • cert manager to create https certificates
  • Digital Ocean load balancer to give you a permanent public IP and route requests to your nginx (you need this because technically your K8s machines don’t have a permanent IP addresses)
  • Configure your domains/subdomains to point to the load balancer via DNS A record.