Which THREE of the following are characteristics of a Kubernetes StatefulSet? (Select THREE)
This is a key characteristic of StatefulSets. They assign ordinal indices (0,1,2,...) and create/scale/terminate pods in order, ensuring that each pod is fully ready before the next is started. For example, when scaling up, pod-0 starts and becomes ready, then pod-1, etc. During termination, it's reverse order. This ordered behavior is critical for applications requiring leader election or primary/secondary roles, as the first pod often becomes the leader.
Why this answer
Option A is correct because a StatefulSet assigns each pod a stable ordinal index (0, 1, 2, ...) and creates, scales, and terminates pods in that strict ordered sequence, unlike a Deployment. Option B is correct because StatefulSets use volumeClaimTemplates to give each pod its own dedicated PersistentVolumeClaim, which is retained and reattached to the same ordinal pod even after rescheduling. Option D is correct because each StatefulSet pod receives a stable, unique network identity in the form of a predictable hostname (pod-name.service-name) backed by a headless Service, so DNS names remain consistent across restarts.
Option C is incorrect because StatefulSet pods are never created in random order; ordering is deterministic by ordinal. Option E is incorrect because StatefulSet pods are deliberately not interchangeable — each has its own identity, hostname, and storage, which is the opposite of the interchangeable replicas in a Deployment.
Exam trap
The trap here is that candidates often confuse StatefulSet behavior with Deployment behavior, assuming pods are interchangeable or created in random order, but StatefulSets enforce ordered creation/termination and unique identities for stateful workloads.