I have running a kubernetes cluster with a master and 2 worker nodes.
root@kube-master:~# kubectl get nodes
NAME STATUS ROLES AGE VERSION
kube-master Ready master 4d19h v1.14.3
kube-node-01 Ready <none> 4d18h v1.14.3
kube-node-02 Ready <none> 6h3m v1.14.3
Now my traefik ingress controller is not able to resolve dns queries.
/ # nslookup acme-v02.api.letsencrypt.org
nslookup: can't resolve '(null)': Name does not resolve
Name: acme-v02.api.letsencrypt.org
Address 1: <my.public.ip> mail.xxx.xxx
Now with tcpdump on my opnsense box I receive queries with my internal search domain appended resolving to my public ip which is wrong.
But for some reason ... spinning up a busybox test pod is working ...
/ # 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
Both /etc/resolve.conf files are the same expect the namespace
Since kubernetes 1.11 coredns ist the default dns resolve system. On this page debugging the dns system with coredns says I should use
root@kube-master:~# kubectl get pods --namespace=kube-system -l k8s-app=coredns
No resources found.
But this does not return anything! Using the kube-dns
returns coredns
pods!
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
Whats going on here?! Is the documentation wrong or something inside my cluster?