<p>I have <code>kubernetes</code> cluster running on 4 <code>Raspberry-pi</code> devices, out of which 1 is acting as <code>master</code> and other 3 are working as <code>worker</code> i.e <code>w1</code>, <code>w2</code>, <code>w3</code>. I have started a daemon set deployment, so each worker is running a pod of 2 containers.</p>

<p><code>w2</code> is running pod of 2 container. If I <code>exec</code> into any container and ping <code>www.google.com</code> from the container, I get the response. But if I do the same on <code>w1</code> and <code>w3</code> it says <code>temporary failure in name resolution</code>. All the pods in kube-system are running. I am using <code>weave</code> for networking. Below are all the pods for kube-system</p>

<pre><code>NAME                                READY     STATUS    RESTARTS   AGE
etcd-master-pi                      1/1       Running   1          23h
kube-apiserver-master-pi            1/1       Running   1          23h
kube-controller-manager-master-pi   1/1       Running   1          23h
kube-dns-7b6ff86f69-97vtl           3/3       Running   3          23h
kube-proxy-2tmgw                    1/1       Running   0          14m
kube-proxy-9xfx9                    1/1       Running   2          22h
kube-proxy-nfgwg                    1/1       Running   1          23h
kube-proxy-xbdxl                    1/1       Running   3          23h
kube-scheduler-master-pi            1/1       Running   1          23h
weave-net-7sh5n                     2/2       Running   1          14m
weave-net-c7x8p                     2/2       Running   3          23h
weave-net-mz4c4                     2/2       Running   6          22h
weave-net-qtgmw                     2/2       Running   10         23h
</code></pre>

<p>If I am starting the containers using the normal docker container command but not from the kubernetes deployment then I do not see this issue. I think this is because of <code>kube-dns</code>. How can I debug this issue.?</p>

S Andrew
<p>You can start by checking if the dns is working</p>

<p>Run the nslookup on kubernetes.default from inside the pod, check if it is working.</p>

<pre><code>[root@metrics-master-2 /]# nslookup kubernetes.default
Server:     10.96.0.10
Address:    10.96.0.10#53

Name:   kubernetes.default.svc.cluster.local
Address: 10.96.0.1
</code></pre>

<p>Check the local dns configuration inside the pods:</p>

<pre><code>[root@metrics-master-2 /]# cat /etc/resolv.conf 
nameserver 10.96.0.10
search default.svc.cluster.local svc.cluster.local cluster.local ec2.internal
options ndots:5
</code></pre>

<p>At last, check the kube-dns container logs while you run the ping command, It will give you the possible reasons why the name is not resolving.</p>

<pre><code>kubectl logs kube-dns-86f4d74b45-7c4ng -c kubedns -n kube-system
</code></pre>

<p>Hope this helps.</p>
