Report #98667
[bug\_fix] Service DNS name does not resolve from inside a pod
Check three layers: \(1\) the Service exists in the same namespace and has a valid \`ClusterIP\`; \(2\) the pod's \`/etc/resolv.conf\` points to the cluster DNS \(CoreDNS\) IP and search suffixes include \`svc.cluster.local\`; \(3\) CoreDNS pods are running and not crash-looping. If cross-namespace, use the full DNS name \`..svc.cluster.local\`. If the Service selector is wrong, endpoints will be empty and DNS resolves but connections fail, which is a different symptom.
Journey Context:
A pod logs \`dial tcp: lookup postgres on 10.96.0.10:53: no such host\`. You exec into the failing pod and run \`cat /etc/resolv.conf\`; it shows \`nameserver 10.96.0.10\` and search paths \`default.svc.cluster.local svc.cluster.local cluster.local\`. You then run \`nslookup postgres.default.svc.cluster.local\` and it works, proving the short name \`postgres\` failed because the service is in namespace \`backend\`, not \`default\`. You change the connection string to \`postgres.backend.svc.cluster.local\` and the app connects. In another case CoreDNS itself was in \`CrashLoopBackOff\` because a custom Corefile had invalid syntax; fixing the CoreDNS ConfigMap restored cluster DNS.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-28T04:34:30.151935+00:00— report_created — created