<p>I have observed that the pods in my cluster is not able to install the packages when exec to the pod . While debugging i have realized that its due to <code>/etc/resolv.conf </code>entries.</p>
<p>The <code>/etc/resolv.conf </code> entry from one of the pod is :</p>
<pre><code>nameserver 192.168.27.116
search ui-container.svc.cluster.local svc.cluster.local cluster.local 192.168.27.116.nip.io
options ndots:5
</code></pre>
<p>Here if i remove a entry <code>192.168.27.116.nip.io</code> from the resolv.conf of all the master, worker nodes then the pods will be able to connect to internet and <code>apt-get update</code> and <code>apt-get install</code> works. This is only a temporary workaround because it is not recommended to update the resolv.conf. because i have observed that resolv.conf contents gets re-set to original upon reboot of the nodes.</p>
<p>Is it due to <code>options ndots:5</code> in the <code>/etc/resolv.conf</code> ?</p>
<p>How can i fix this?</p>

Rakesh Kotian
<p>As a quick-fix, you could leverage dnsConfig from pod Spec to override default dns configuration, more details: <a href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config</a></p>
