<p>I want to Ping a Nodename in a pod. By CoreDns forward to anothor Service that is current cluster's.
When forwarding, append a domain name to source nodename, like <strong>searches</strong> in /etc/resolv.conf. How do I config yaml of coredns pod or corefile of coredns.</p>
<pre><code># in one pod
ping node1
# equivalent
ping node1.xxx.com

</code></pre>

Xu Gao
<p>You have some misunderstanding on how DNS works. DNS server is not responsible for you &quot;search&quot; domains. DNS server has absolutely no idea of search domains because this is client side setting.</p>
<p>Read more for perfect explanation of pods DNS settings:</p>
<ul>
<li><p><a href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config" rel="nofollow noreferrer">Pod's DNS Config</a></p>
</li>
<li><p><a href="https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/#introduction" rel="nofollow noreferrer">Customizing DNS Service</a></p>
</li>
</ul>
