<p>I have running a kubernetes cluster with a master and 2 worker nodes.</p>

<pre><code>root@kube-master:~# kubectl get nodes
NAME           STATUS   ROLES    AGE     VERSION
kube-master    Ready    master   4d19h   v1.14.3
kube-node-01   Ready    &lt;none&gt;   4d18h   v1.14.3
kube-node-02   Ready    &lt;none&gt;   6h3m    v1.14.3
</code></pre>

<p>Now my traefik ingress controller is not able to resolve dns queries.</p>

<pre><code>/ # nslookup acme-v02.api.letsencrypt.org
nslookup: can't resolve '(null)': Name does not resolve

Name:      acme-v02.api.letsencrypt.org
Address 1: &lt;my.public.ip&gt; mail.xxx.xxx
</code></pre>

<p>Now with tcpdump on my opnsense box I receive queries with my internal search domain appended resolving to my public ip which is wrong.</p>

<p>But for some reason ... spinning up a busybox test pod is working ...</p>

<pre><code>/ # nslookup acme-v02.api.letsencrypt.org
Server:    10.96.0.10
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local

Name:      acme-v02.api.letsencrypt.org
Address 1: 2a02:26f0:ef:197::3a8e g2a02-26f0-00ef-0197-0000-0000-0000-3a8e.deploy.static.akamaitechnologies.com
Address 2: 2a02:26f0:ef:181::3a8e g2a02-26f0-00ef-0181-0000-0000-0000-3a8e.deploy.static.akamaitechnologies.com
Address 3: 104.74.120.43 a104-74-120-43.deploy.static.akamaitechnologies.com
</code></pre>

<p>Both /etc/resolve.conf files are the same expect the <code>namespace</code></p>

<p>Since kubernetes 1.11 coredns ist the default dns resolve system. On <a href="https://v1-14.docs.kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/" rel="nofollow noreferrer">this</a> page debugging the dns system with coredns says I should use</p>

<pre><code>root@kube-master:~# kubectl get pods --namespace=kube-system -l k8s-app=coredns
No resources found.
</code></pre>

<p>But this does not return anything! Using the <code>kube-dns</code> returns <code>coredns</code> pods!</p>

<pre><code>root@kube-master:~# kubectl get pods --namespace=kube-system -l k8s-app=kube-dns
NAME                      READY   STATUS    RESTARTS   AGE
coredns-fb8b8dccf-jmhdm   1/1     Running   5          4d19h
coredns-fb8b8dccf-tfw7v   1/1     Running   5          4d19h
</code></pre>

<p>Whats going on here?! Is the documentation wrong or something inside my cluster?</p>

<p>The default ndots:n is 5. This means that if the name contains less than 5 dots inside it, the syscall will try to resolve it sequentially going through all local search domains first and - in case none succeed - will resolve it as an absolute name only at last.</p>
