CertKeen

Certified Kubernetes Administrator (CKA) · Free practice question 6 of 12

Pod dnsPolicy Default versus ClusterFirst

A pod spec at Ullswater Mills sets dnsPolicy: Default. What DNS configuration does the pod get?

  1. A.It uses cluster DNS, the usual default for pods
  2. B.It gets no nameserver until dnsConfig is added
  3. C.It uses CoreDNS only for Service names in its own namespace
  4. D.It inherits the resolver settings of the node it runs on
Show answer and explanation

Correct answer: D. It inherits the resolver settings of the node it runs on

Why: Despite its name, Default is not the default policy: the pod inherits name resolution from its node, so cluster Service names do not resolve. The actual default is ClusterFirst, which uses cluster DNS. None ignores cluster settings and requires dnsConfig to supply resolvers.

More free Certified Kubernetes Administrator (CKA) questions