Persistent Volumes and Claims
Understand how to provide durable storage to Pods using Persistent Volumes and Persistent Volume Claims.
Pods and Ephemeral Data
Pods are born and die, but your application's data often needs to live on. Think of a database or user-uploaded files.
- When a Pod restarts or is rescheduled, any data stored directly within its container filesystem is lost.
- This ephemeral nature is fine for stateless applications, but critical data needs a durable solution.
- Kubernetes provides a powerful system to manage persistent storage that survives Pod lifecycles.
PersistentVolume: Cluster Storage
A PersistentVolume (PV) is a piece of storage in your Kubernetes cluster.
- It's a cluster-scoped resource, meaning it doesn't belong to any specific namespace.
- PVs are provisioned by an administrator or dynamically by a StorageClass.
- They abstract away the details of the underlying storage technology (e.g., Google Persistent Disk, AWS EBS, NFS share).
All lessons in this course
- ConfigMaps for Configuration
- Secrets for Sensitive Data
- Persistent Volumes and Claims
- StorageClasses and Dynamic Provisioning