Skip to content

k8s local ingress DNS service, replacement for minikube-ingress-dns

License

Notifications You must be signed in to change notification settings

talss89/kube-ingress-dns

Repository files navigation

kube-ingress-dns

Expose your k8s ingress rules via local DNS. A rewrite of Minikube's ingress-dns addon, but in rust, and for any cluster (K3s, Microk8s, etc).

Quickstart

  1. Install in your cluster - kubectl apply -f https://raw.githubusercontent.com/talss89/kube-ingress-dns/main/manifest/ingress-dns.yaml
  2. Set up your local machine to use the resolver (guide coming soon)

Feature Status

  • Docker images for linux/amd64 and linux/arm64
  • Ingress support
  • Gateway API support
  • Management utility to configure local machine DNS

This is a very early work-in-progress, but I am using this locally on my machine currently. Contributions are very welcome, and encouraged!

Why use this?

When running k8s locally, you often need to access services exposed via ingresses. You could manually maintain your /etc/hosts file with all the domain names, and respective IP addresses, but this is error-prone and cumbersome. A much better approach is to use DNS.

This pod exposes a DNS server on your k8s node's host network, which will resolve any ingress domains and point them at the correct ingress external IP.

All you need to do is make sure your local machine is configured to use the resolver.

⚠️ This should never be used in production, on a public cluster.

What was wrong with minikube-ingress-dns?

Aside from being fairly minikube opinionated, there are now a few issues with the ingress-dns minikube addon:

  • It's not actively maintained, and fails to work on current k8s versions.
  • It's fairly inefficient; relying on NodeJS

How does this project address those issues?

This kube-ingress-dns project is:

  • Non-opinionated - will work with any k8s cluster
  • Lightweight - Built in rust with minimal dependencies
  • K8s compliant - Uses kube-rs to interact with the cluster