Report #752
[bug\_fix] Service DNS name does not resolve inside cluster
Use the fully qualified DNS name \`..svc.cluster.local\` when calling across namespaces, or ensure the client is in the same namespace. If same-namespace resolution fails, check that the service has endpoints \(\`kubectl get endpoints \`\), CoreDNS pods are running \(\`kubectl get pods -n kube-system -l k8s-app=kube-dns\`\), and no NetworkPolicy blocks UDP/TCP port 53.
Journey Context:
Service A in namespace \`frontend\` tries to reach Service B using \`http://api:8080\` but gets \`getaddrinfo ENOTFOUND api\`. A developer assumes Kubernetes DNS is broken. In reality the client pod is in namespace \`frontend\` and the service is in \`backend\`; unqualified names only resolve within the same namespace. Using \`api.backend.svc.cluster.local\` fixes it. Another variant: the service selector is wrong so \`kubectl get endpoints api\` shows no IPs, meaning DNS resolves but there are no backing pods. Fixing the selector's matchLabels restores endpoints and connectivity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T12:53:33.258841+00:00— report_created — created