<p>when I using apt-get command to update the kubernetes(v1.15.2) pods, it failed:</p>

<pre><code>root@nginx-deployment-5754944d6c-7gbds:/# apt-get update
Err http://security.debian.org wheezy/updates Release.gpg
  Temporary failure resolving 'security.debian.org'
Err http://http.debian.net wheezy Release.gpg               
  Temporary failure resolving 'http.debian.net'
Err http://http.debian.net wheezy-updates Release.gpg       
  Temporary failure resolving 'http.debian.net'
Err http://nginx.org wheezy Release.gpg                     
  Temporary failure resolving 'nginx.org'
Reading package lists... Done
W: Failed to fetch http://http.debian.net/debian/dists/wheezy/Release.gpg  Temporary failure resolving 'http.debian.net'

W: Failed to fetch http://http.debian.net/debian/dists/wheezy-updates/Release.gpg  Temporary failure resolving 'http.debian.net'

W: Failed to fetch http://security.debian.org/dists/wheezy/updates/Release.gpg  Temporary failure resolving 'security.debian.org'

W: Failed to fetch http://nginx.org/packages/mainline/debian/dists/wheezy/Release.gpg  Temporary failure resolving 'nginx.org'

W: Some index files failed to download. They have been ignored, or old ones used instead.
</code></pre>

<p>now I could ping success to my kube-dns(ip:10.96.0.10,coredns version 1.6.7):</p>

<pre><code>root@nginx-deployment-5754944d6c-7gbds:/# cat /etc/resolv.conf 
nameserver 10.96.0.10
search default.svc.cluster.local svc.cluster.local cluster.local
options ndots:5

root@nginx-deployment-5754944d6c-7gbds:/# ping 10.96.21.92
PING 10.96.21.92 (10.96.21.92): 48 data bytes
^C--- 10.96.21.92 ping statistics ---
11 packets transmitted, 0 packets received, 100% packet loss
root@nginx-deployment-5754944d6c-7gbds:/# ping 10.96.0.10 
PING 10.96.0.10 (10.96.0.10): 48 data bytes
56 bytes from 10.96.0.10: icmp_seq=0 ttl=64 time=0.103 ms
56 bytes from 10.96.0.10: icmp_seq=1 ttl=64 time=0.094 ms
56 bytes from 10.96.0.10: icmp_seq=2 ttl=64 time=0.068 ms
56 bytes from 10.96.0.10: icmp_seq=3 ttl=64 time=0.066 ms
56 bytes from 10.96.0.10: icmp_seq=4 ttl=64 time=0.060 ms
56 bytes from 10.96.0.10: icmp_seq=5 ttl=64 time=0.064 ms
</code></pre>

<p>why the pods could not access to the network? Now I could not install any tool to check the pods network problem in this pod. What should I do to find out where is going wrong?</p>

<p>I tried to create a busybox and test the kube-dns like this:</p>

<pre><code>[miao@MeowK8SMaster1 ~]$ kubectl exec -it busybox -- nslookup kubernetes
Server:    10.96.0.10
Address 1: 10.96.0.10

nslookup: can't resolve 'kubernetes'
command terminated with exit code 1
</code></pre>

Dolphin
<p>I understand why you need to exec into coredns pod.</p>

<p>It, however, allows only coredns binary to be executed (not any shell). </p>

<p>E.g:</p>

<pre><code>k exec -it &lt;&lt;coredns podname&gt;&gt; -n kube-system -- ./coredns -version
</code></pre>

<p>This will returns the version of the coredns binary that is running. </p>
