-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Closed
Labels
area/dnsarea/kubectlsig/networkCategorizes an issue or PR as relevant to SIG Network.Categorizes an issue or PR as relevant to SIG Network.
Description
I have two pods in the kube-system namespace, one can resolve dns, When resolve the dns in another pod, it can't resolve the name, and shows the server is null. But the correct dns server already in /etc/resolv.conf
[root@ip-172-18-12-44 heapster]# kubectl get pod --namespace=kube-system
NAME READY STATUS RESTARTS AGE
busybox 1/1 Running 0 10s
heapster-dje5c 1/1 Running 0 1h
influxdb-grafana-iuebs 2/2 Running 0 1h
kube-dns-v19-82nif 3/3 Running 0 2h
[root@ip-172-18-12-44 heapster]# kubectl exec --namespace=kube-system busybox -- nslookup kubernetes.default
Server: 10.0.0.10
Address 1: 10.0.0.10 kube-dns.kube-system.svc.cluster.local
Name: kubernetes.default
Address 1: 10.0.0.1 kubernetes.default.svc.cluster.local
[root@ip-172-18-12-44 heapster]# kubectl exec --namespace=kube-system heapster-dje5c -- nslookup kubernetes.default
Server: (null)
nslookup: can't resolve 'kubernetes.default': Name does not resolve
Address 1: ::1 localhost
Address 2: 127.0.0.1 localhost
error: error executing remote command: error executing command in container: Error executing in Docker Container: 1
[root@ip-172-18-12-44 heapster]# kubectl exec -it --namespace=kube-system heapster-dje5c -- /bin/sh
/ # cat /etc/resolv.conf
search kube-system.svc.cluster.local svc.cluster.local cluster.local ec2.internal
nameserver 10.0.0.10
options ndots:5
sfxworks, tech-mint, odannyc, vincent-pli, theAkito and 7 more
Metadata
Metadata
Assignees
Labels
area/dnsarea/kubectlsig/networkCategorizes an issue or PR as relevant to SIG Network.Categorizes an issue or PR as relevant to SIG Network.