StatefulSet
A Kubernetes object for applications that need stable identity — each pod gets an ordinal number (mysql-0, mysql-1), its own persistent volume, and a DNS name that survives restarts. For databases, queues, etcd clusters.
Distinct from Deployment, which treats pods as interchangeable. Pod names are predictable: $(statefulset-name)-$(ordinal). Headless Service provides per-pod DNS. PVC template creates a separate volume per pod. Ordered startup/shutdown: 0 starts first, N-1 last; on scale-down N-1 goes first. RollingUpdate strategy updates in reverse order. Operators (Postgres-Operator, Strimzi) build on top of StatefulSets with custom logic.