Local Kubernetes with DNS

jeansen

Jeansen

Posted on March 10, 2023

Local Kubernetes with DNS

A simple and short experience report from my daily Kubernetes playground.

I've got a local cluster running. Plain Kubernetes on virutal Nodes with KVM. That's my little lab where I can break things and repair them. That's the way I learn in tandem with all the abundance of documenation (which is old, as soon as you read it).

So, having services and exposing them as NodePort or LoadBalancer is nice, but you either have to type in the IP of the cluster, put some static values in your hosts file or provide a header when running curl against a service.

But, the little Kubernetes project external-dns allows you to make your cluster create DNS entries in cloud providers and even local DNS.

In my case, I have the great tool pi-hole running on a dedicated little Raspberry-Pi, which also serves as my primary DNS.

Now, whenever I expose an service and/or create an Ingress resource, specified DNS names will be relayed to pi-hole. No need to hack in numbers or manipulate static files, anymore.

I love it! ;-)

💖 💪 🙅 🚩
jeansen
Jeansen

Posted on March 10, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Local Kubernetes with DNS
kubernetes Local Kubernetes with DNS

March 10, 2023