[ SRE_ARENA ]
K8S STORAGE

K8s Storage: Escaping Ephemerality

DOWNLOADING CONCEPT: 1. THE EPHEMERAL NATURE OF CONTAINERS...
  • ↳By default, a container's filesystem is completely ephemeral.
  • ↳If your Postgres Pod writes 50GB of data to /var/lib/postgresql/data, and the Pod crashes, that 50GB is instantly and permanently deleted when the new Pod starts.
  • ↳To run stateful applications (Databases, Message Queues) in Kubernetes, we must decouple the storage lifecycle from the Pod lifecycle.
  • ↳The data must outlive the Pod.
▲ LIVE INCIDENTA Postgres pod was rescheduled to a new node, but has been stuck in Pending for 15 minutes.
sre@arena:~/k8s-storage
sre@arena:~$ kubectl describe pod postgres-0