DEV Community

Jeansen
Jeansen

Posted on • Edited on

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! ;-)

Top comments (0)