Stage 3 · Mission Data: storage
Problem: delete booking-db's Pod and every booking disappears. The Service name still works, and the new Pod is Ready, with an empty database.
Stage 3 makes the data outlive the Pod. By the end you can follow one booking from a SQL row down to a directory on a node, and say which failures it survives:
Chapters
- Volumes: where a container writes, what a mount changes, and which events each volume type survives.
- Claims and provisioning: PVC, PV and StorageClass; why provisioning waits for the scheduler; access modes.
- StatefulSets and headless DNS: why a Deployment mishandles a database; stable member names; per-member DNS.
- StatefulSet storage and operations: one claim per member; what updates, scale-down and deletion do to data; Redis persistence.
- Initialization and seeding: schema on an empty volume, re-runnable seed Jobs, why migrations are separate.
- Recovery boundaries: persistence vs replication vs backup; RPO and RTO; a restore rehearsal.
First pass: chapters 1–4 are enough to follow the walkthrough. Read 5 and 6 before you trust the data.
Ready for the walkthrough when you can answer
- A container restarts, then later its Pod is replaced. What happens to a file in
emptyDireach time? - A PVC has been
Pendingfor ten minutes and no Pod uses it. Is anything wrong? - Why does
booking-db-0come back with the same claim but a new UID? - The node running
redis-0loses network. Why does no newredis-0start elsewhere? - You delete the StatefulSet, then the PVC. Which step loses the data?
- After a volume is lost, the tables and demo users are back. Why is that not a recovery?