-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DNS lookup not working when starting minikube with --dns-domain #1674
Comments
Looks like we need to propagate the --dns-domain flag into the dns addon. I think this should be doable on minikube start. |
Also if I start minikube with the |
Given that modern distros claim |
This is my work around. # enable dns
$ minikube start
$ minikube addons enable kube-dns
$ minikube addons list
$ eval $(minikube docker-env)
$ kubectl get svc kube-dns -n kube-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP 19d
$ minikube ssh
$ sudo vi /etc/resolv.conf
# add a line in resolv.conf
# nameserver 10.96.0.10
$ nslookup kube-dns.kube-system.svc.cluster.local
Server: 10.96.0.10
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local
Name: kube-dns.kube-system.svc.cluster.local
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local |
@reymont
EDIT:
The dns
|
@trobert2 Yes, you are right. EDIT: Make sure the kube-dns pods STAUTS is runing. kubectl get pods -n kube-system
kube-dns-86f6f55dd5-gkd2q 3/3 Running 30 24d |
i can reproduce it with v 1.9.0 too.
kubectl exec auth-68c7556479-7wpdn -it -- bash
nslookup: can't resolve '(null)': Name does not resolve
|
when minikube ssh enter, then edit /etc/resolv.conf, anyone find it, so the method is invalid. anyone have another. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
in your minikube VM: Change /etc/systemd/resolved.conf then |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
The issue is relevant for 0.30.0 |
How do you get this sort of change to persist? Ideally, I'd like to just copy the /etc/systemd/resolved.conf from the host. |
experienced the same error with minikube + win10 my workaround (followed @gitdr suggestion):
-hth |
/remove-lifecycle rotten |
/reopen |
@ThisIsQasim: You can't reopen an issue/PR unless you authored it or you are a collaborator. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I can confirm that this error still persists with the hyperkit driver on macOS. Editing systemd-resolved fixes it. |
The issue is relevant for minikube v1.12.3. This way helped me.
|
/reopen |
@erickalmeidaptc: You can't reopen an issue/PR unless you authored it or you are a collaborator. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Minikube version 0.19.1
Environment:
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 workdo
nslookup kubernetes.default.svc.cluster.local 10.0.0.1
-> works but is not expected to workAnything 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
The text was updated successfully, but these errors were encountered: