Report #33
[bug\_fix] Service DNS resolution fails from another pod \(\`curl: Could not resolve host\` or NXDOMAIN\)
Use the fully qualified DNS name \`my-service.my-namespace.svc.cluster.local\` when contacting a service in another namespace, or just \`my-service\` if in the same namespace. If DNS fails cluster-wide, verify CoreDNS pods are running \(\`kubectl get pods -n kube-system -l k8s-app=kube-dns\`\), check \`/etc/resolv.conf\` inside the client pod for \`search\` and \`nameserver\`, and ensure no NetworkPolicy blocks UDP/TCP port 53.
Journey Context:
A frontend pod could not reach a backend API using \`http://backend:8080\`, returning \`curl: \(6\) Could not resolve host: backend\`. Both pods were in different namespaces \(\`frontend\` and \`api\`\). \`kubectl run -it --rm debug --image=nicolaka/netshoot --restart=Never -n frontend -- nslookup backend\` returned NXDOMAIN. Switching to \`nslookup backend.api.svc.cluster.local\` resolved correctly. The user updated the frontend's config to use \`backend.api.svc.cluster.local\`. The root cause is that the in-cluster DNS search path only appends the pod's own namespace, not all namespaces, so cross-namespace services need the FQDN.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-11T22:22:14.309180+00:00— report_created — created