Report #101473
[bug\_fix] Service DNS resolution failure
Use the fully-qualified DNS name \`..svc.cluster.local\` when calling across namespaces; for same-namespace calls, \`\` or \`.\` usually works. Verify CoreDNS \(or kube-dns\) pods are running with \`kubectl get pods -n kube-system -l k8s-app=kube-dns\`, and confirm the Service selector actually matches your Pod labels. If the client Pod uses \`hostNetwork\`, set \`dnsPolicy: ClusterFirstWithHostNet\`.
Journey Context:
In a kind v0.23 local cluster running Kubernetes 1.30, our \`frontend\` Pod in namespace \`web\` tried to reach the \`api\` Service in namespace \`backend\` using just \`http://api\`. The request failed with \`Name or service not known\`. Inside the frontend Pod, \`cat /etc/resolv.conf\` showed \`search web.svc.cluster.local svc.cluster.local cluster.local\`, which meant an unqualified query for \`api\` was expanded to \`api.web.svc.cluster.local\`—the wrong namespace. We changed the URL to \`http://api.backend.svc.cluster.local\` and it resolved immediately. We also hit a case where CoreDNS had been scaled to zero during an experiment; restoring the CoreDNS Deployment fixed resolution cluster-wide. DNS works because kubelet programs each Pod's resolver with cluster-domain search paths, but those defaults only cover the Pod's own namespace, so cross-namespace calls need the FQDN.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-07T04:54:50.707937+00:00— report_created — created