Report #3891
[bug\_fix] Service DNS resolution fails from inside a pod
Use the fully qualified DNS name \`..svc.cluster.local\` when contacting a service in another namespace. If even short names fail, verify CoreDNS pods are running \(\`kubectl get pods -n kube-system -l k8s-app=kube-dns\`\), check for NetworkPolicies blocking UDP/TCP port 53, and confirm the pod's \`/etc/resolv.conf\` points to the cluster DNS IP.
Journey Context:
A frontend pod in namespace \`web\` could not reach \`http://backend:8080\`. I \`kubectl exec\`'d into the frontend and ran \`nslookup backend\`, which returned \`NXDOMAIN\`. The \`backend\` Service lived in namespace \`api\`, so the cluster's default DNS search suffixes only appended \`web.svc.cluster.local\`, not \`api.svc.cluster.local\`. Using \`backend.api.svc.cluster.local\` resolved immediately. I updated the frontend config to the FQDN and the requests succeeded. In a different cluster the issue was a NetworkPolicy that blocked egress UDP 53; allowing CoreDNS traffic fixed it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T18:28:22.402933+00:00— report_created — created