Skip to content
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

nslookup kubernetes.default is stuck whereas nslookup kubernetes works fine #75

Closed
msavlani opened this issue Apr 11, 2017 · 2 comments
Closed

Comments

@msavlani
Copy link

Hi,

I am facing weird issues Kubernetes 1.5.2

Its a single 2 nodes cluster which is setup using "https://kubernetes.io/docs/getting-started-guides/centos/centos_manual_config/"

then i created skydns pods.

[root@masterhost ~]# kubectl get pods -n kube-system
NAME READY STATUS RESTARTS AGE
kube-dns-v20-jm7x7 3/3 Running 0 2h
kubernetes-dashboard-255567031-7dn4l 1/1 Running 44 11d

[root@mwhlvatd2d2 ~]# kubectl get services -n kube-system
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kube-dns 10.254.0.10 53/UDP,53/TCP 2h
kubelet None 10250/TCP 8d
kubernetes-dashboard 10.254.25.228 80:31000/TCP 24d

I created one busybox pod and tried to do nslookup for kubernetes service as follows

It worked fine.
[root@masterhost ~]# kubectl exec -ti busybox1 -- nslookup kubernetes
Server: 10.254.0.10
Address 1: 10.254.0.10 kube-dns.kube-system.svc.cluster.local

Name: kubernetes
Address 1: 10.254.0.1 kubernetes.default.svc.cluster.local

Then i did nslookup for kubernetes.default
[root@masterhost ~]# kubectl exec -ti busybox1 -- nslookup kubernetes.default
Server: 10.254.0.10
Address 1: 10.254.0.10 kube-dns.kube-system.svc.cluster.local

---- Here it got stuck for some time and then returned following error ;

nslookup: can't resolve 'kubernetes.default'

Expected result

[root@masterhost ~]# kubectl exec -ti busybox1 -- nslookup kubernetes.default.svc.cluster.local
Server: 10.254.0.10
Address 1: 10.254.0.10 kube-dns.kube-system.svc.cluster.local

Name: kubernetes.default.svc.cluster.local
Address 1: 10.254.0.1 kubernetes.default.svc.cluster.local

Any help here is appreciated.

@MrHohn
Copy link
Member

MrHohn commented Apr 17, 2017

Could you post the content of /etc/resolv.conf on that busybox? It would be even better if you can use dig to track the DNS querying sequence.

@bowei
Copy link
Member

bowei commented May 16, 2017

Please reopen and post updates if this is still an issue.

@bowei bowei closed this as completed May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants