CKAD Services and Networking Practice Question
Which TWO statements about headless services are correct?
⚠ Common exam trap
A common mix-up: candidates confuse headless services with regular ClusterIP services, assuming they still provide load balancing or have a virtual IP, when in fact headless services are designed for direct pod access and stable network identities, not traffic distribution.
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
✓
DNS returns the pod IPs directly
Headless services are created by setting `clusterIP: None` in the service spec. When a DNS lookup is performed for a headless service, the DNS server returns the IP addresses of the matching pods directly, rather than a single virtual ClusterIP. This is because there is no ClusterIP to load-balance traffic, so DNS returns all pod IPs (A/AAAA records) for the service name, enabling 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.
- ✗
They require a selector to match pods
Why it's wrong here
A headless service does not require a selector. If a selector is defined, Kubernetes automatically creates Endpoints and the DNS will return the IPs of the matching pods; without a selector, the service manages no Endpoints and you must define them manually. Thus, the claim that a selector is required is false because the service can still exist and provide a DNS name even when no selector is present.
- ✓
DNS returns the pod IPs directly
Why this is correct
In a headless service, the DNS A record query resolves directly to the IP addresses of all pods backing the service, rather than to a single ClusterIP virtual IP. Because clusterIP is set to None, no load-balanced IP exists, and the DNS server returns a set of A records, each corresponding to an individual pod endpoint, allowing clients to contact those pods directly.
- ✓
They are used for StatefulSets to provide stable network identities
Why this is correct
Headless services are a critical component for StatefulSets because they give each pod a stable, unique DNS name. The service's DNS records are created with hostnames derived from the StatefulSet name and the pod's ordinal index, such as podname-0.service.namespace.svc.cluster.local, which enables stateful applications to discover and connect to specific instances without relying on dynamic IP addresses.
- ✗
They provide load balancing across pods
Why it's wrong here
A headless service does not perform load balancing. Since there is no ClusterIP and no kube-proxy forwarding, the DNS query returns all pod IPs at once, and the responsibility for choosing a target falls to the client. This is fundamentally different from a regular Service, which uses a virtual IP to distribute traffic across pods; a headless service simply exposes the raw endpoints.
- ✗
They have a ClusterIP assigned
Why it's wrong here
A headless service is specifically defined with the field clusterIP: None, which instructs Kubernetes not to allocate a ClusterIP address. As a result, the service does not have a virtual IP that can be used for load balancing or stable connection; instead, DNS queries for the service name return the IPs of the selected pods directly, making any statement about a ClusterIP being assigned incorrect.
Visual reference
Go deeper
Related to this question
About these practice questions
One of 826 original CKAD 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 →
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.