Report #103752
[bug\_fix] Service DNS resolution fails or returns wrong IP for external names
For in-cluster services, verify the service exists in the same namespace or use the fully qualified domain name \`..svc.cluster.local\`. For external names, check \`/etc/resolv.conf\` inside the pod; if \`ndots:5\` causes short names to be tried against search domains first, set \`dnsConfig.ndots: 1\` or use a trailing dot \(FQDN\) for external lookups.
Journey Context:
A pod logs \`curl: \(6\) Could not resolve host: api.example.com\` but only inside Kubernetes; the same container on your laptop resolves fine. \`kubectl exec\` into the pod shows \`/etc/resolv.conf\` has \`ndots:5\` and search domains including \`default.svc.cluster.local\`. Because the query is \`api.example.com\`, the resolver appends search domains first and NXDOMAIN responses from cluster DNS override the real lookup. You set the pod's \`dnsConfig.ndots: 1\` and use \`api.example.com.\` \(trailing dot\) in the app config; resolution works.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-13T04:38:41.993127+00:00— report_created — created