How to Properly Set Up A Records for My K8s Cluster?

0
6
Asked By CuriousCat123 On

I'm testing a bare metal Kubernetes cluster at home, which is exposed to the internet (but that's not the main focus of my question!). Here's some setup info:

- Control-plane public IP: 1.2.3.4
- Worker nodes' public IPs: 5.6.7.8, 9.10.11.12

I'm using Cilium for networking, and everything's ready with my pods deployed correctly. I can reach the pods via NodePort and Ingress with HostNetwork. However, I'm unsure how to configure my DNS setup.

I want to make sure I set the correct A records on my DNS provider for my domain, www.myexample.com. Should I point it to the control plane IP, the worker node IPs, or all of them? Also, if I decide to add a load balancer or proxy, what IP should I use for that? I'm looking for the best practice in this situation, especially since I'm not too experienced with networking. Thanks for any guidance!

4 Answers

Answered By TechieTurtle77 On

If your workloads aren't running on the control plane, then your DNS or load balancer shouldn't point to that IP. Instead, focus on the worker nodes since those are where your applications are deployed.

Answered By ClientSquid99 On
Answered By NetworkNinja42 On

DNS is used to translate names into IPs so clients can access your services. Since the clients are external users, make sure your A records point to an IP address that’s reachable over the internet. You should use the external IP of the worker nodes. If you add a load balancer, then direct your DNS to that load balancer's public IP, and let it handle requests to the nodes.

Answered By NetworkNinja42 On

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.