Report #87026
[bug\_fix] DNS resolution fails for a cluster Service name from inside a pod
Confirm the target Service exists in the right namespace and has matching selector labels and ready Endpoints \(\`kubectl get endpoints \`\). Verify CoreDNS pods are running \(\`kubectl get pods -n kube-system -l k8s-app=kube-dns\`\). Use the fully qualified domain name \`..svc.cluster.local\` when resolving across namespaces, or adjust \`ndots\` in \`/etc/resolv.conf\` if short names are misrouted.
Journey Context:
A frontend pod logs getaddrinfo ENOTFOUND api-service when calling http://api-service:8080. The frontend is in namespace web, but the API Service is in backend. You exec into the frontend pod and run \`nslookup api-service\`, which queries the cluster DNS and returns NXDOMAIN because DNS search domains only append the current namespace. You try \`nslookup api-service.backend.svc.cluster.local\` and it resolves. Checking \`kubectl get endpoints api-service -n backend\` shows ready endpoints, so the Service is fine. CoreDNS is running. The fix is either to use the FQDN in the app config or to add \`dnsConfig.ndots: 2\` so short names with one dot are resolved as absolute first. After updating the URL, the frontend connects.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T04:39:50.030822+00:00— report_created — created