Courseiva
Services & NetworkingeasyMultiple ChoiceObjective-mapped

CKA Services & Networking Practice Question

A pod is running with the default DNS policy. The cluster DNS service is at 10.96.0.10. The node's /etc/resolv.conf has nameserver 8.8.8.8. When the pod tries to resolve an external hostname like 'example.com', which DNS server will it query first?

⚠ Common exam trap

Candidates often confuse the default DNS policy ('ClusterFirst') with the 'Default' policy, mistakenly thinking the pod inherits the node's /etc/resolv.conf directly, when in fact 'ClusterFirst' forces the pod to use the cluster DNS service as the primary resolver.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The cluster DNS service (10.96.0.10)

With the default DNS policy (ClusterFirst), pods are configured to use the cluster DNS service (10.96.0.10) as the first nameserver in their /etc/resolv.conf. This is achieved by kubelet injecting the cluster DNS IP and a search domain into the pod's resolv.conf. Therefore, the pod will query the cluster DNS service first for any hostname resolution, including external names like 'example.com'.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The node's DNS server (8.8.8.8)

    Why it's wrong here

    When a pod is created with the default `ClusterFirst` DNS policy, the `kubelet` on the node configures the pod's `/etc/resolv.conf` to point to the cluster DNS service IP, not the node's own DNS server. Therefore, DNS queries originating from the pod are directed to the `kube-dns` or `CoreDNS` service running within the cluster, which then handles resolution, potentially forwarding to upstream servers like 8.8.8.8 if necessary. The pod itself does not directly query the node's `resolv.conf` entries.

  • There is no DNS resolution; the pod cannot resolve external names by default

    Why it's wrong here

    This statement is incorrect because pods with the default `ClusterFirst` DNS policy are fully capable of resolving external names. The cluster DNS service (e.g., CoreDNS or kube-dns) is configured to forward non-cluster domain queries to upstream DNS servers, typically inherited from the node's `resolv.conf` or explicitly configured in the cluster DNS deployment. This forwarding mechanism ensures seamless external name resolution for pods.

  • The cluster DNS service (10.96.0.10)

    Why this is correct

    With the default `ClusterFirst` DNS policy, the `kubelet` configures the pod's `/etc/resolv.conf` to list the cluster DNS service IP (e.g., 10.96.0.10, which is the default `kube-dns` or `CoreDNS` service IP in many clusters) as the primary nameserver. All DNS queries originating from the pod are initially sent to this cluster DNS service. The service then resolves internal cluster names directly and forwards external name queries to upstream DNS servers.

  • The pod's own /etc/resolv.conf which contains the node's DNS

    Why it's wrong here

    While the pod does use its own `/etc/resolv.conf` for DNS resolution, this file is specifically configured by the `kubelet` to point to the cluster DNS service IP, not the node's DNS server. The `kubelet` ensures that the `nameserver` entry in the pod's `resolv.conf` is the `kube-dns` or `CoreDNS` service IP, enabling cluster-internal and external name resolution through the cluster's dedicated DNS service.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

One of 302 original CKA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CKA practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKA exam.