CKA Workloads and Scheduling Practice Question
You have a Deployment 'db' with 3 replicas. Each pod writes to a PersistentVolumeClaim (PVC). A StatefulSet is required for stable network identities and ordered pod management. Which of the following is a key characteristic that differentiates a StatefulSet from a Deployment?
⚠ Common exam trap
Watch out — candidates often confuse the automatic creation of a Headless Service (which is required but not automatically created) with the automatic creation of a Service for each pod, leading them to incorrectly select Option B.
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
✓
StatefulSets maintain a sticky identity for each pod, including stable hostnames and persistent storage
StatefulSets assign each pod a unique, stable network identity (e.g., a hostname derived from the StatefulSet name and ordinal index) and guarantee that each pod's PersistentVolumeClaim is bound to the same PersistentVolume across rescheduling. This ensures that each pod retains its identity and data, which is critical for stateful applications like databases. Deployments, in contrast, treat pods as interchangeable and do not guarantee stable hostnames or persistent storage binding.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
StatefulSets support rolling updates but not canary deployments
Why it's wrong here
StatefulSets do support canary-like deployments through their `updateStrategy.rollingUpdate.partition` field. This field allows administrators to specify how many pods should remain at the old version during an update, effectively creating a controlled rollout or canary release by updating only a subset of pods at a time. Therefore, the statement claiming they do not support canary deployments is incorrect.
- ✗
StatefulSets automatically create a Service for each pod
Why it's wrong here
The assertion that StatefulSets automatically create a Service for each pod is incorrect. StatefulSets explicitly require a headless Service to be manually defined and associated with them, which provides the stable network identity and DNS records for each pod. This headless Service enables direct communication to individual pods within the StatefulSet, a crucial feature for stateful applications.
- ✗
StatefulSets cannot use PersistentVolumeClaims
Why it's wrong here
This statement is fundamentally incorrect; StatefulSets are specifically designed to manage stateful applications, and a core component of this is their ability to provision and manage PersistentVolumeClaims. They achieve this through `volumeClaimTemplates` defined in their specification, which automatically create a unique PersistentVolumeClaim for each replica. This ensures that each pod has its own dedicated, persistent storage that remains associated with its identity.
- ✓
StatefulSets maintain a sticky identity for each pod, including stable hostnames and persistent storage
Why this is correct
StatefulSets are designed to provide a stable, unique identity to each pod they manage, which is crucial for stateful applications. This identity includes a stable network hostname, typically in the format `$(pod-name).$(headless-service-name)`, and persistent storage that remains associated with the pod's ordinal index even if the pod is rescheduled to a different node. This ensures data integrity and consistent application behavior across pod lifecycle events.
Go deeper
Related to this question
Learn chapter
Deployments and ReplicaSets
Key term
Deployments
A Kubernetes resource that manages a set of identical Pods, ensuring they run the correct number of replicas and can be updated or rolled back without downtime.
Key term
StatefulSets
A Kubernetes resource that manages stateful applications by providing stable network identities and persistent storage for each pod.
About these practice questions
Courseiva writes every CKA question from scratch — 302 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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 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.