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
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.
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.
Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically