Report #98210
[bug\_fix] DNS resolution fails for a Kubernetes Service name from inside a pod
Verify the Service exists in the same namespace and that the client uses the correct DNS name \(\`\` for same namespace, \`..svc.cluster.local\` across namespaces\). If DNS is broken cluster-wide, check that the CoreDNS pods are running, that kube-dns Service exists, and that the pod's \`/etc/resolv.conf\` points to the cluster DNS IP. Flush or restart the client pod if it caches stale results.
Journey Context:
My app could not reach \`http://backend:8080\` even though \`kubectl get svc backend\` showed the Service existed. I exec'd into the pod and ran \`nslookup backend\`, which returned \`NXDOMAIN\`. The app was deployed in namespace \`frontend\` but the Service was in \`backend\`. Kubernetes DNS is scoped to the namespace by default; a bare service name only resolves within the same namespace. Changing the URL to \`http://backend.backend.svc.cluster.local:8080\` fixed it. In another cluster, even FQDN lookups failed. I checked \`kubectl get pods -n kube-system\` and CoreDNS was CrashLoopBackOff because its ConfigMap had an invalid upstream server. Restoring the default CoreDNS ConfigMap and restarting the CoreDNS pods restored DNS for the whole cluster.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-27T04:34:55.973965+00:00— report_created — created