Minikube with DNS on ARM-based Mac


Currently as of June 2023 there seem to be no way to use minikube's ingress-dns addon on an ARM-based Mac.

Reading on it seems that this should just work. However, a small repro:

minikube start --driver=docker --addons=ingress,ingress-dns --install-addons=true

kubectl apply -f

minikube tunnel

# Other terminal:
šŸŸ nslookup hello-john.test (minikube ip)
;; connection timed out; no servers could be reached

After a while I found this posting

with a reference to the docker driver limitations where it clearly said

>The ingress, and ingress-dns addons are currently only supported on Linux. See #7332

Well, the minikube ip isn't actually reachable with the Docker driver on Mac. So trying to skip docker driver and go straight to hyperkit it turns out it's not supported on Apple Silicon:

minikube start --driver=hyperkit

Exiting due to DRV_UNSUPPORTED_OS: The driver 'hyperkit' is not supported on darwin/arm64

So what to do?


Found this post

with a reference to

Complete working example:

# Start minikube with ingress-dns
minikube start --driver=docker --addons=ingress,ingress-dns --install-addons=true

# Install and enable WireGuard tunnel so that minikube ip is reachable from host machine
brew install chipmk/tap/docker-mac-net-connect
sudo brew services start chipmk/tap/docker-mac-net-connect

# test that dns works with minikube as dns server:
kubectl apply -f
šŸŸ nslookup hello-john.test (minikube ip)

Non-authoritative answer:
Name:	hello-john.test

# Add minikube to host machine dns lookup
cat >/etc/resolver/minikube-test <<EOF
domain test
nameserver $(minikube ip)
search_order 11
timeout 5

# Test to actually reach the ingress without specifying dns
āœ— curl hello-john.test
Hello, world!
Version: 1.0.0
Hostname: hello-world-app-f4cd6696d-l9c88

This example is to show everything working with as few commands as possible. I'm however using nix-darwin to set most of this up.