Courseiva
Services and Networking →mediumMultiple Choice

CKAD Services and Networking Practice Question

A developer creates a headless Service named 'db' to discover all database pod IPs. The Service selects pods with label 'app: db'. The pods are assigned IPs 10.0.0.1, 10.0.0.2, and 10.0.0.3. When a client performs a DNS lookup for 'db', what will it receive?

⚠ Common exam trap

Watch out — candidates often confuse headless Services with regular Services, assuming DNS returns a single cluster IP or a round-robin list, when in fact headless Services return all pod IPs as separate A records with no load balancing.

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

✓

All three pod IPs as separate A records

A headless Service (clusterIP: None) does not have a cluster IP. Instead, DNS queries for the Service name return A records for all pods matching the selector. Since the Service selects pods with label 'app: db', the DNS lookup for 'db' returns the three pod IPs (10.0.0.1, 10.0.0.2, 10.0.0.3) as separate A records, allowing direct pod-to-pod communication.

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 IP of the first pod only

    Why it's wrong here

    A headless Service has no cluster IP, so DNS returns A records for every ready endpoint — all three pod IPs — not just the first. It is tempting because round-robin or single-address behaviour appears in other lookup modes, but that applies to ClusterIP Services, not endpoint enumeration.

  • ✗

    The cluster IP of the Service

    Why it's wrong here

    Headless Services deliberately omit a cluster IP; DNS resolves directly to pod addresses instead. A cluster IP is what a standard ClusterIP Service returns, which suits clients wanting a single stable virtual endpoint rather than individual pod discovery.

  • ✓

    All three pod IPs as separate A records

    Why this is correct

    A headless Service has no cluster IP, so DNS returns the pod IPs directly. With the default ClusterIP setting, the lookup yields three separate A records, one per selected pod, satisfying the requirement to discover all database pod IPs.

  • ✗

    A round-robin list of pod IPs

    Why it's wrong here

    DNS returns all pod IPs as separate A records; the client, not DNS, chooses one, so ordering is not round-robin. Round-robin distribution is what kube-proxy performs for ClusterIP Services, which suits load balancing across backends without client-side selection.

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

This CKAD question is part of Courseiva's 826-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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 CKAD 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 CKAD exam.