Courseiva
Workloads and Scheduling →hardMultiple Choice

CKA Workloads and Scheduling Practice Question

A StatefulSet 'db' has 3 replicas. You scale it down to 1. In what order are the pods deleted?

⚠ Common exam trap

Test-takers frequently confuse StatefulSet scaling behavior with Deployment scaling, where pods are deleted in random order or simultaneously, leading them to incorrectly choose options A, B, or C instead of the reverse ordinal deletion required by StatefulSet.

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

✓

db-2, db-1, db-0

When a StatefulSet is scaled down, pods are deleted in reverse ordinal order, starting from the highest index. This ensures that the StatefulSet's ordinal and identity guarantees are maintained, as each pod has a unique, stable identity. For a StatefulSet with 3 replicas (db-0, db-1, db-2), scaling to 1 deletes db-2 first, then db-1, leaving db-0 running.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    db-0, db-1, db-2

    Why it's wrong here

    This sequence represents the ascending order of pod creation when scaling up a StatefulSet from 0 to 3 replicas. During a scale-down operation, Kubernetes terminates pods in the exact reverse order of their creation to maintain data safety and state consistency. Therefore, db-0 and db-1 would not be targeted for deletion before db-2.

  • ✗

    Random order

    Why it's wrong here

    Unlike stateless workloads managed by Deployments or ReplicaSets, which terminate pods in an arbitrary or non-deterministic order, StatefulSets enforce strict, ordered pod management. Pods are assigned unique, persistent ordinal indexes that dictate a predictable lifecycle sequence. Consequently, Kubernetes will never delete StatefulSet pods in a random or chaotic fashion.

  • ✗

    All pods are deleted simultaneously

    Why it's wrong here

    StatefulSets default to a sequential termination policy where each pod must be completely shut down and deleted before the next one is targeted. Deleting all pods simultaneously would violate the controller's guarantee of orderly termination, potentially causing data corruption in distributed databases. Only when a pod is fully terminated will the controller proceed to the next lower ordinal.

  • ✓

    db-2, db-1, db-0

    Why this is correct

    When scaling down a StatefulSet, Kubernetes terminates pods one at a time in reverse ordinal order, starting from the highest index down to the lowest. In this scenario, the controller first gracefully terminates db-2, waits for its complete removal, and then proceeds to terminate db-1 to reach the target of 1 replica (db-0). This predictable, step-by-step reduction ensures that distributed state is safely migrated or persisted.

About these practice questions

This CKA question is part of Courseiva's 726-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 →

How Courseiva writes practice questions · Editorial policy

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.