I’m new to Kubernetes, and I have a 3-nodes, Microk8s cluster with HA, MetalLB, and Ingress enabled.
The main purpose of the cluster is to serve a single website.
I don’t know how to/where to set up the DNS server, for the cluster.
Currently, the domain is set up on Cloudflare, but I’m open to any alternative which is more suitable.
So, to make the question clear, how should I set up an external DNS server to point to my Microk8s cluster, with the mentioned setup?
2 Likes
I’m stuck on the same problem.
I have multiple websites running all with different domains working with Ingress.
It works if I configure my router to port forward any requests to one of the nodes but I don’t know how to point it to the cluster instead?
I’m guessing we’ll need to set up a load balancer with MetalLB to create one IP to serve all nodes, but I could be wrong and I’m not sure if it will be automated if we add more nodes.
1 Like
Just to clear some things up, to avoid confusion about the DNS server inside Kubernetes itself. The DNS server inside Kubernetes is just there for internal use on the *.cluster.local domain. This is discussed a bit here in the documentation.
What I believe you’re both asking about is “how to expose services to the internet”. This is don’t with services that have LoadBalancer type and LoadBalancers only work when you have an appropriate CCM setup.
Most cloud providers have their own CCMs you can install and load balanced services will have an external IP that comes from some cloud load balancer that gets spun up. There’s also MetalLB which gets configured with a pool of IPs that it handles assignments and addressing of.
Most Ingress controllers tend to use a service with type of LoadBalancer, or in the case of K3S, there is a baked in controller that deploys a proxy services for load balancer type services. I kindof took that idea to have Traefik v2 be an ingress controller for my deployments in this example.
There isn’t really a one-size-fits-all solution for ingress and the CCM in Kubernetes. Hopefully this gives you some ideas on where to go though.