minikube: DNS lookup not working when starting minikube with --dns-domain
Minikube version 0.19.1
Environment:
- OS MAC OS 10.11.4
- VM Driver virtualbox
- ISO version minikube-1.13.1-3.iso:
- Install tools:
- Others:
What happened: If I start minikube with --dns-domain the dns entries that are registered are still registered with the domain cluster.local
What you expected to happen: I would expect that the dns entries are registered with domain provided in the startup parameters.
How to reproduce it (as minimally and precisely as possible):
Start minikube with --dns-domain test.cluster.local
do nslookup kubernetes.default.svc.test.cluster.local 10.0.0.1 -> does not work
do nslookup kubernetes.default.svc.cluster.local 10.0.0.1 -> works but is not expected to work
Anything else do we need to know: To me it looks like this is caused by the hard coded cluster.local in https://github.com/kubernetes/minikube/blob/master/deploy/addons/kube-dns/kube-dns-controller.yaml
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 8
- Comments: 22 (3 by maintainers)
This is my work around.
in your minikube VM:
Change /etc/systemd/resolved.conf From: #DNS= To: DNS=<IP of the DNS server>
then sudo systemctl restart systemd-resolved
i can reproduce it with v 1.9.0 too. The inter-pod communication doesn’t work.
minikube version: v0.25.0kubectl exec auth-68c7556479-7wpdn -it – bash
nslookup: can’t resolve ‘(null)’: Name does not resolve
Looks like we need to propagate the --dns-domain flag into the dns addon. I think this should be doable on minikube start.
The issue is relevant for minikube v1.12.3. This way helped me.
experienced the same error with minikube + win10
my workaround (followed @gitdr suggestion):
-hth