CKA Workloads and Scheduling Practice Question
A StatefulSet named 'web' has 3 replicas. You need to update the container image from 'nginx:1.19' to 'nginx:1.20' using a rolling update with ordered pod management. What must you ensure in the StatefulSet spec?
⚠ Common exam trap
Test-takers frequently confuse Deployment rolling update parameters (like maxSurge or maxUnavailable) with StatefulSet update strategies, or mistakenly think that setting a partition value is required for a full rolling update, when in fact the key requirement is the podManagementPolicy being OrderedReady.
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
✓
Set spec.podManagementPolicy to OrderedReady (default)
For a StatefulSet to perform a rolling update with ordered pod management (pods updated one at a time in reverse ordinal order), the podManagementPolicy must be set to OrderedReady. This is the default policy and ensures that pods are created, deleted, and updated in a strict sequential order, maintaining the stable identity and startup ordering required by stateful applications.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Set spec.updateStrategy.rollingUpdate.maxSurge to 1
Why it's wrong here
Setting `spec.updateStrategy.rollingUpdate.maxSurge` to 1 is incorrect because `maxSurge` is a field exclusive to Kubernetes Deployments, designed for stateless applications to allow creating new pods before terminating old ones. StatefulSets, which manage stateful applications requiring stable network identities and ordered operations, do not support `maxSurge`. Instead, StatefulSets manage `maxUnavailable` pods during a rolling update to ensure data integrity and controlled transitions.
- ✗
Set spec.updateStrategy.rollingUpdate.partition to 0
Why it's wrong here
Setting `spec.updateStrategy.rollingUpdate.partition` to 0 is not the correct approach to enforce ordered pod management. The `partition` field in a StatefulSet's `RollingUpdate` strategy defines a boundary: pods with an ordinal greater than or equal to the partition value will be updated. A `partition` of 0 means all pods (from index 0 upwards) are eligible for update, effectively triggering a full rollout. While it controls *which* pods are updated, it does not dictate the *order* or *concurrency* of those updates; that is handled by `podManagementPolicy`.
- ✗
Set spec.podManagementPolicy to Parallel
Why it's wrong here
Setting `spec.podManagementPolicy` to `Parallel` is incorrect for ensuring ordered updates. The `Parallel` policy instructs the StatefulSet controller to launch or terminate all pods concurrently without waiting for them to become ready or fully terminated. This approach can lead to race conditions or data inconsistencies for stateful applications that rely on a strict order of operations or stable network identities, thus failing to meet the requirement for a one-at-a-time, ordered update.
- ✓
Set spec.podManagementPolicy to OrderedReady (default)
Why this is correct
Setting `spec.podManagementPolicy` to `OrderedReady` is the correct choice, as it is the default and ensures ordered, one-at-a-time updates. This policy dictates that the StatefulSet controller will create, update, or delete pods strictly in ascending ordinal order (for creation/update) or descending ordinal order (for deletion), waiting for each pod to be fully ready or terminated before proceeding to the next. This sequential processing is crucial for maintaining the stable identity and data consistency of stateful applications during lifecycle events.
Go deeper
Related to this question
About these practice questions
One of 302 original CKA 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 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.