Comparison
Ephemeral container filesystemvsPersistent volume
Ephemeral container filesystem
the uploaded files were there all afternoon and gone after a restart, because they were written inside the container.
The rule that everything a container writes outside a mounted volume is discarded when it stops. It is deliberate — it is what makes a container replaceable — and it is the single most common surprise for an application ported from a virtual machine. It also has a capacity dimension: unbounded local writes fill the node's disk and get the workload evicted, taking well-behaved neighbours with it.
Full entry →Persistent volume
the pod died, came back on another node, and the data was still there because the disk followed it.
Storage whose lifetime is independent of any pod, requested by a claim and attached wherever the workload is scheduled. It is what makes a stateful workload survivable, and it drags real constraints in with it: most block storage attaches to one node at a time and lives in one availability zone, which silently pins the workload to that zone. Reclaim behaviour is the other trap — a claim deleted with the wrong policy takes the data with it.
Full entry →