A fully qualified domain name (FQDN) is a complete DNS name that identifies a Kubernetes Service or Pod within the cluster hierarchy. Service names follow <service-name>.<namespace-name>.svc.cluster.local. section 6.2.4
Use the appropriate name when resolving Kubernetes workloads:
- Use a Service FQDN such as apache-svc.default.svc.cluster.local when the target Service is in another namespace. section 6.2.4
- Use a Pod FQDN such as 10-244-0-14.default.pod.cluster.local; CoreDNS changes the Pod IP dots to dashes. section 6.2.4
- Short names depend on the pod's DNS search domains, which are listed in /etc/resolv.conf. section 6.2.4
Verify cross-namespace resolution
From a shell inside a pod, curl apache-svc may fail when the Service is elsewhere, while curl apache-svc.default succeeds. Inspect /etc/resolv.conf to check search domains and the CoreDNS nameserver. section 6.2.4 section 6.8
root@nginx-76d6c9b8c-8lqgg:/# cat /etc/resolv.conf search c01383.svc.cluster.local svc.cluster.local cluster.local nameserver 100.96.0.10 options ndots:5
Inspect a representative pod resolver configuration showing namespace-specific search domains and the cluster DNS server. section 6.2.4

