<p>I have added one more nameserver and also rotate options so that for dns resolution, different name servers are picked using round robin fashion but it's picking first name server always. This is my resolv.conf</p>
<pre><code>nameserver 10.96.0.10
nameserver 8.8.8.8
search measurement.svc.cluster.local svc.cluster.local cluster.local
options rotate timeout:1 ndots:5
</code></pre>
<p>Second nameserver is never getting picked. I tried running nslookup  from kuberenetes pod multiple times. It's always picking first one and that's some cluster level default. Is there some additional configuration change required at k8s level or it has something to do with Coredns policy?
I would really appreciate any help.</p>

Bhavya Sharma
<p>When you specify multiple name servers in <code>resolv.conf</code> file with options rotate, the resolver library should rotate through each name server in order for each DNS query. However in your case, the second nameserver is being ignored.</p>
<p>This issue could be caused by several factors:</p>
<ol>
<li><p>Check if the second nameserver is configured correctly and is reachable.</p>
</li>
<li><p>Ensure the network connectivity is not an issue and check network configuration and firewall settings.</p>
</li>
<li><p>The issue might be caused by DNS caching also. The first name server could be cached and the resolver library might be using a cached response instead of rotating to the next server. Clear the DNS cache to see if it resolves the issue.</p>
</li>
<li><p>Also, try to increase the timeout value in options timeout : 3 or 5 seconds. The first server might be responding faster than the second server, so the resolver library is continuously using the first one.</p>
</li>
</ol>
