<p>I am trying to learn DNS in kubernetes with <a href="https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/" rel="noreferrer">https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/</a></p>

<ol>
<li><p>I deployed the busybox</p></li>
<li><p><code>kubectl get pods busybox -o wide</code></p>

<pre><code>NAME      READY     STATUS    RESTARTS   AGE       IP           NODE
busybox   1/1       Running   0          16m       10.200.1.5   worker-1
</code></pre></li>
<li><p><code>kubectl exec -ti busybox -- nslookup kubernetes.default</code></p>

<pre><code>Server:    10.32.0.10
Address 1: 10.32.0.10 kube-dns.kube-system.svc.cluster.local

nslookup: can't resolve 'kubernetes.default'
command terminated with exit code 1
</code></pre></li>
<li><p>Do I need to modify the /etc/resolv.conf file of the worker-1 node. currently the /etc/resolv.conf content is below</p>

<pre><code>nameserver 169.254.169.254
search c.k8s-project-193906.internal google.internal**
</code></pre></li>
<li><p>Also the version of the worker-1
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:    18.04
Codename:   bionic</p></li>
</ol>

<p>Please help me figure out which configuration causes the resolve error.  Do I need to change resolve.conf file and based on what?</p>

<p>You have encountered a bug in the latest versions of the busybox docker image.  Use the tag <code>busybox:1.28</code> instead of <code>latest</code>. This <a href="https://github.com/docker-library/busybox/issues/48" rel="noreferrer">bug link is here</a>:</p>

<pre><code>"Nslookup does not work in latest busybox image"
"1.27/1.28 are working , 1.29/1.29.1 are not"
</code></pre>

<p>Here it is <strong>failing</strong> with the <code>busybox:latest</code> tag.</p>

<pre><code>$ kubectl run busybox --image busybox:latest --restart=Never --rm -it busybox -- sh
If you don't see a command prompt, try pressing enter.
/ # nslookup kubernetes.default
Server:         10.96.0.10
Address:        10.96.0.10:53

** server can't find kubernetes.default: NXDOMAIN

*** Can't find kubernetes.default: No answer
/ # exit
pod "busybox" deleted
</code></pre>

<p>Here's the same command <strong>succeeding</strong> with the <code>busybox:1.28</code> tag.</p>

<pre><code>$ kubectl run busybox --image busybox:1.28 --restart=Never --rm -it busybox -- sh
If you don't see a command prompt, try pressing enter.
/ # nslookup kubernetes.default
Server:    10.96.0.10
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local

Name:      kubernetes.default
Address 1: 10.96.0.1 kubernetes.default.svc.cluster.local
/ # exit
pod "busybox" deleted
</code></pre>
