CKAD StatefulSet Practice Question
A developer wants to deploy a stateless application as a set of identical pods. They need the pods to be distributed across nodes and have stable network identities. Which resource should they use?
⚠ Common exam trap
Candidates may incorrectly choose Deployment, thinking that a Service provides stable network identities. However, a Service provides a stable endpoint for the entire set of pods, not individual pod identities. StatefulSet is needed for per-pod stable DNS names, which match the requirement for 'stable network identities' for each pod.
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
✓
StatefulSet
StatefulSet is the correct resource because it provides each pod with a stable, unique network identity (e.g., pod-name-0, pod-name-1) that persists across rescheduling. While Deployment manages replicas for stateless applications, it does not assign per-pod stable hostnames. The question explicitly requires 'stable network identities' for identical pods, which is a defining feature of StatefulSet. A Service combined with a Deployment gives a stable endpoint for the set, not per-pod identities.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Job
Why it's wrong here
A Job runs a set of pods to completion for batch processing, after which the pods are terminated and never restarted with the same identity. It provides no guarantee of stable, unique hostnames; pod names are generated with random suffixes and the Job's successful completion means the workload is not long-running. Since the goal is to maintain a persistent set of pods, a Job is fundamentally the wrong controller regardless of identity requirements.
- ✗
Deployment
Why it's wrong here
A Deployment manages a ReplicaSet to maintain a desired number of pods, but every pod is ephemeral and indistinguishable, with names like deploy-name-XXXXX-YYYYY that change on recreation. It provides no stable network identity: when a pod is deleted, its replacement is a new pod with a new IP and hostname, and there is no built-in mechanism to preserve ordering or unique per-pod DNS entries. Thus, Deployments are unsuitable for workloads requiring each pod to have a fixed identity.
- ✗
DaemonSet
Why it's wrong here
A DaemonSet schedules exactly one pod on every eligible node, using the node hostname plus a random suffix for pod names rather than an ordinal index. This design serves node-level infrastructure like log collectors or kube-proxy, not apps that need stable network identities. Because pods are tied to nodes and recreated with new names, any requirement for persistent per-pod hostnames is impossible to meet.
- ✓
StatefulSet
Why this is correct
A StatefulSet assigns each pod a stable, zero-based ordinal hostname (e.g., web-0, web-1) derived from the StatefulSet name and replica index. These identities persist across rescheduling because a replacement pod always inherits the same ordinal and, if configured, the same PersistentVolumeClaim. Combined with a headless service, each pod gets a unique DNS name, which perfectly fulfills the requirement for stable network identities in a stateless or stateful application.
Go deeper
Related to this question
About these practice questions
One of 160 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.