CoreDNS

CoreDNS and Cluster Naming Conventions

CoreDNS 366,312 (github.com/coredns/coredns (https://github.com/coredns/coredns 14,346 ), a CNCF graduated project) runs behind the kube-dns Service at 10.96.0.10. Every Service is <service>.<namespace>.svc.cluster.local, and each Pod's /etc/resolv.conf makes short names work:

A Pod's resolver settings, and the search list at workShell
kubectl exec client -- cat /etc/resolv.conf
kubectl exec client -- nslookup db 2>/dev/null | grep -E "can't find|^Name|^Address: "
kubectl get configmap coredns -n kube-system -o jsonpath='{.data.Corefile}' | sed -n '7p;13p'
Output
search booknest.svc.cluster.local svc.cluster.local cluster.local
nameserver 10.96.0.10
options ndots:5
** server can't find db.cluster.local: NXDOMAIN
** server can't find db.svc.cluster.local: NXDOMAIN
Name:   db.booknest.svc.cluster.local
Address: 10.96.28.125
** server can't find db.svc.cluster.local: NXDOMAIN
** server can't find db.cluster.local: NXDOMAIN
    kubernetes cluster.local in-addr.arpa ip6.arpa {
    forward . /etc/resolv.conf {

With ndots:5, a name with fewer than five dots is tried with each search suffix, so db cost failed queries before db.booknest.svc.cluster.local answered, and api.example.com pays three failures first unless written with a trailing dot. The Corefile's kubernetes plugin answers for cluster.local; everything else goes to the node's resolver, Docker 514 's DNS on kind 14,561 . Nginx 75 's resolver ignores the search list, so BookNest's front end needs the full name (Exposing BookNest).