A Kubernetes DNS policy controls how a pod receives and prioritizes DNS configuration. The default, ClusterFirst, tries cluster DNS before the node’s DNS settings. section 11.1.3
Choose a policy according to the pod’s networking needs:
- ClusterFirst uses the internal cluster DNS first, then the node’s DNS configuration. section 11.1.3
- Default uses the DNS configuration of the node. section 11.1.3
- None provides no Kubernetes-managed DNS configuration; configure the pod through dnsConfig. section 11.1.3
- ClusterFirstWithHostNet supports special pods using the host’s network. section 11.1.3
/ # cat /etc/resolv.conf search kiada.svc.cluster.local svc.cluster.local cluster.local localdomain nameserver 10.96.0.10 options ndots:5
Inspecting /etc/resolv.conf reveals the search domains, cluster DNS nameserver, and resolver options that result from the pod’s DNS configuration. section 11.1.3
