What you will learn
- Use PersistentVolumes and Claims
- Understand StatefulSets
- Pick storage classes
New to this? Start here
The basics, in plain English
Most Pods are stateless and can disappear anytime. But databases need their data to stick around. Kubernetes offers persistent storage and a special controller (StatefulSet) for apps that must keep their identity and data.
- Stateless
- An app that keeps no important data of its own; any copy is interchangeable.
- Stateful
- An app that must remember data, like a database.
- Persistent Volume
- Long-lived storage that survives Pod restarts and rescheduling.
- StatefulSet
- A controller for stateful apps that gives each Pod a stable name and its own storage.
- Claim
- A Pod’s request for a chunk of persistent storage of a certain size.
01
State in K8s
PVCs request storage that PVs satisfy. StatefulSets give pods stable names and per-pod storage, essential for databases.
Finished this topic?
Mark it done to earn 100 XP and keep your streak alive.