k8s-coredns-troubleshooting
CoreDNS troubleshooting
Find out why CoreDNS does not answer a name the way it should, and propose a fix. Read first, ask before changing. Run the investigation commands freely. Run a command under an "Ask first" line only after the user approves that exact command; if your credentials do not allow it, give it to the user to run. Never run a "Proposed fix"; hand it to the user.
CoreDNS runs in kube-system as the Deployment coredns (label k8s-app=kube-dns),
behind the Service kube-dns, and reads its configuration, the Corefile, from the
ConfigMap coredns. Each server block (.:53 { ... }, or example.com:53 { ... } for
one domain) lists plugins: kubernetes answers names under cluster.local, forward
sends everything else upstream (by default to the node's /etc/resolv.conf), cache,
rewrite and hosts change answers, errors logs failures, loop stops CoreDNS when
it would query itself, and reload reads an edited Corefile about 30 seconds after the
ConfigMap reaches the pod. The default Corefile has no log plugin, so successful
queries and NXDOMAIN answers are not logged.