<p>When I run <code>nslookup</code> on my docker container, I get this error  </p>

<pre><code> nslookup  10.0.96.xx
 nslookup: can't resolve '(null)': Name does not resolve

 Name:      10.0.96.xx
 Address 1: 10.0.96.xx
</code></pre>

<p>I've read that the problem comes from docker which injects this on the <code>resolv.conf</code>:</p>

<pre><code>nameserver 10.109.0.xx
nameserver 10.96.0.xx
search devlan.xxx.corp poc.svc.cluster.local svc.cluster.local cluster.local
options ndots:2 edns0
</code></pre>

<p>With kubernetes, I tried to overwrite it with the following parameters on my <code>PodConfFile.yaml</code>.</p>

<pre><code>spec:
  dnsPolicy: "None"
#  dnsPolicy: ClusterFirst
  dnsConfig:
   nameservers:
     - 10.109.0.xx
     - 10.96.0.xx
   searches:
     - devlan.xxx.corp
     - poc.svc.cluster.local
     - svc.cluster.local
     - cluster.local
   options:
     - name: ndots
       value: "2"
     - name: edns0
</code></pre>

<p>Do you have any advice to resolve this issue? </p>

<ul>
<li>Docker version: 18.03.1-ce</li>
<li>go1.9.3</li>
</ul>

<p>i found a solution to this issue .  on your Pod remove this params  </p>

<blockquote>
  <p>nameserver  options  searches</p>
</blockquote>

<p>and add thie one </p>

<pre><code>spec:
  dnsPolicy: Default
</code></pre>

<p>it will inherit directly the DNS configuration . </p>

<p>you will be able to ping a external services  . </p>
