CKAD Services and Networking Practice Question
A StatefulSet is deployed with a headless service (clusterIP: None). The pods are named 'web-0', 'web-1', 'web-2'. What DNS name resolves to the specific IP of 'web-1'?
⚠ Common exam trap
Many candidates confuse the DNS naming pattern for StatefulSet pods with the standard service DNS (which uses the service name only), leading them to omit the pod name or misorder the components.
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
✓
web-1.web.default.svc.cluster.local
A is correct because in a StatefulSet with a headless service (clusterIP: None), each pod gets a unique DNS name following the pattern `<pod-name>.<service-name>.<namespace>.svc.cluster.local`. For pod 'web-1' in the default namespace, this resolves to the pod's specific IP address via a DNS A record, not a service VIP.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
web-1.web.default.svc.cluster.local
Why this is correct
This FQDN follows the exact pattern for a StatefulSet-managed pod backed by a headless service: <pod-name>.<service-name>.<namespace>.svc.cluster.local. Because the service is headless (clusterIP: None), Kubernetes publishes an A record for each of its endpoints, and web-1 is a valid ordinal pod name in the StatefulSet. Therefore, this name resolves directly to the IP address of the web-1 pod and is the correct target address.
- ✗
web-1.default.svc.cluster.local
Why it's wrong here
This record omits the headless service name, producing a DNS name that Kubernetes does not support for pod-level resolution. The valid FQDN requires the service name as the second label, so the missing 'web' segment means this name cannot be resolved to any pod IP. Even though 'web-1' is a valid StatefulSet pod hostname, the hostname alone is not a fully qualified DNS name without the service subdomain.
- ✗
web-0.web.default.svc.cluster.local
Why it's wrong here
This address points to a different member of the StatefulSet: web-0 is the first replica (ordinal index 0), whereas the question asks for the second replica, web-1. Both pods exist under the same headless service, and each has its own distinct A record, so resolving this name returns the IP for the wrong pod entirely. Targeting web-0 instead of web-1 would break any workflow that requires the specific replica.
- ✗
web.web-1.default.svc.cluster.local
Why it's wrong here
This candidate inverts the required label order: the pod name must precede the service name, not the other way around. In Kubernetes DNS, the pattern is <pod-name>.<service-name>.<namespace>.svc, so 'web.web-1' places the service name first and the pod name second, making the FQDN invalid. The correct sequence is web-1 (pod) followed by web (service), yielding web-1.web.default.svc.cluster.local.
Visual reference
Go deeper
Related to this question
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 →
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.