<p>I want to change ndots default value from 5 to 3 in all pods in Kubernetes.
for example, this is the current resolv.conf output from one of my pods. How can I change the value of ndots from 5 to 3 in all current and future pods:</p>
<pre><code>[root@master01 ~]# kubectl exec test-7c9b9bc678-kfcsj -- cat /etc/resolv.conf 
nameserver 10.96.0.10
search default.svc.cluster.local svc.cluster.local cluster.local
options ndots:5
</code></pre>
<p>Kubernetes version: 1.18.
Install on bare metal servers.
Thank you in advanced</p>

<p>You can adjust this configuration in the pod's <code>dnsConfig</code> section. See more details <a href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config" rel="nofollow noreferrer">here</a>.</p>
<p>We are doing the same in the helm chart responsible for deploying applications into our cluster, like so -</p>
<pre><code>dnsConfig:
  options:
    - name: ndots
      value: &quot;3&quot;
</code></pre>
