Storage, state and recovery
Prerequisites: 02-objects, 04-eks-model
06 / Ask for storage, then mount it
Scroll the diagram sideways for readable labels.
A disk can pin a Pod to a zone
Scroll the diagram sideways for readable labels.
Learning objective and mechanism verified
A PVC asks for storage; a PV represents allocated storage; a StorageClass describes provisioning policy. A CSI integration connects Kubernetes to the storage system. Pods mount claims. Reclaim policy controls what happens when a claim is released; Pod replacement is a different event from deleting a claim.
[S06]EKS choices verified
Use EBS integration for supported block-volume workloads and EFS integration when shared filesystem semantics fit. EBS is zonal; align scheduling with volume topology. Auto Mode uses the ebs.csi.eks.amazonaws.com provisioner, distinct from the standard EBS CSI provisioner. Fargate cannot mount EBS and supports EFS static rather than dynamic provisioning.
[S21] [S29] [S39]Worked example and decision synthesis
In the insurance scenario, keep transaction state in a managed PostgreSQL service and documents in object storage rather than inside disposable API containers. This proposed boundary reduces the database-operator scope of the EKS platform team, but database networking, credentials, migrations, recovery and cost remain explicit responsibilities.
[S25] [S06]Common pitfall synthesis
A persistent volume is not proof that a database can survive losing a zone. Likewise, copying Kubernetes manifests does not restore transaction data. Define which system owns database backups, document versions and workload configuration, then restore them together in a compatible sequence.
[S06] [S21]Further improvement synthesis
Specify an acceptable recovery point (RPO: tolerated data loss) and recovery time (RTO: tolerated outage). Rehearse an isolated restore and validate business records, not just that a Pod becomes Running. These are proposed acceptance criteria, not measured outcomes.
[S06] [S22]Check yourself: Is a Pod rescheduled to another AZ enough to recover an EBS-backed database?
Not by itself. The volume’s zone, data replication or restore strategy, database consistency and available capacity must all be considered.