Skip to content
masterclass Buddy

DevOps · Concept

StatefulSet

A StatefulSet manages Pods that need stable identity, storage, or ordered operations. Each Pod keeps an ordinal name, network identity, and storage claim when it is replaced.

Last updated

Since
v1.31 for configurable start ordinals; v1.32 for the stable

Syntax

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: <name>
spec:
  serviceName: <headless-service>
  replicas: <number>
  selector:
    matchLabels: <labels>
  template: <pod-template>
  volumeClaimTemplates: <claims>

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • StatefulSetSpec
  • StatefulSetStatus
  • Headless Service
  • PersistentVolumeClaim
  • PersistentVolume
  • Pod Management Policies
  • RollingUpdate
  • OnDelete

Source: StatefulSets | Kubernetes. Checked 2026-11-03.