<p>I dig everywhere to see why we don't have DNS resolution for static pods and couldn't find a right answer. Most basic stuff and couldn't find appealing answer.</p>
<p>Like you create a static pod, exec into it, do a &quot;nslookup pod-name&quot; or like &quot;nslookup 10-44-0-7.default.pod.cluster.local&quot;, I know the second one is for Deployment and DaemonSet which creates A record, why not for static pods because they are ephemeral, in that way Deployment also is. Please tell me if it is possible and how we enable it.</p>
<p>My testing for the failed queries, all are static pods created with &quot;kubectl run busybox-2 --image=busybox --command sleep 1d&quot;</p>
<p>Used this as syntax:</p>
<p>In general a pod has the following DNS resolution: pod-ip-address.my-namespace.pod.cluster-domain.example.</p>
<pre><code>vagrant@kubemaster:~$ kubectl get pods -n default -o wide
NAME                          READY   STATUS    RESTARTS       AGE    IP          NODE         NOMINATED NODE   READINESS GATES
busybox-1                     1/1     Running   0              135m   10.36.0.6   kubenode02   &lt;none&gt;           &lt;none&gt;
busybox-2                     1/1     Running   0              134m   10.44.0.7   kubenode01   &lt;none&gt;           &lt;none&gt;
busybox-sleep                 1/1     Running   19 (24h ago)   23d    10.44.0.3   kubenode01   &lt;none&gt;           &lt;none&gt;


/ # cat /etc/resolv.conf
nameserver 10.96.0.10
search default.svc.cluster.local svc.cluster.local cluster.local Dlink
options ndots:5


/ # nslookup 10-44-0-7.default.pod.cluster.local
Server:         10.96.0.10
Address:        10.96.0.10:53

Name:   10-44-0-7.default.pod.cluster.local
Address: 10.44.0.7

*** Can't find 10-44-0-7.default.pod.cluster.local: No answer

/ # nslookup 10-44-0-6.default.pod.cluster.local
Server:         10.96.0.10
Address:        10.96.0.10:53


*** Can't find 10-44-0-6.default.pod.cluster.local: No answer
</code></pre>
<p>Appreciate the help.</p>

<ul>
<li>DNS Lookup &amp; Reverse lookups does not work for pods/podIPs (<em><strong>By Design!</strong></em>).</li>
<li>Why ?
I also had the similar question , After spending a lot of time exploring following are reasons that convinced me :</li>
</ul>
<ol>
<li>Pods &amp; and its IPs are ephemeral. even static pods when they get restarted(recreated) they might end up getting a different IP Address.</li>
<li>It will be huge overload on coredns/any dns server to keep a track of ever changing POD IP Addresses.</li>
<li>Due to above reasons It is recommended to access the POD through a <em><strong>service</strong></em> because service will have a constant IP irrespective of how the endpoint IPS have changed. for services DNS lookups &amp; reverse loookups work fine.</li>
</ol>
