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?
- A.It uses cluster DNS, the usual default for pods
- B.It gets no nameserver until dnsConfig is added
- C.It uses CoreDNS only for Service names in its own namespace
- 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
- Drain flags for DaemonSets and emptyDir
- CronJob concurrencyPolicy Forbid
- Listing cluster-scoped API resources
- Setting the default namespace in a context
- Session affinity by client IP
- Raw block volumes with volumeMode
- Debugging a node with kubectl debug
- CreateContainerConfigError from missing ConfigMap
- Approving a client CertificateSigningRequest
- NetworkPolicy ipBlock with except
- Restoring a PVC from a VolumeSnapshot