Persistent Volumes & ClaimsIntermediate
1Question 1 of 1
yamlHow do PersistentVolumes (PV) and PersistentVolumeClaims (PVC) manage storage in Kubernetes?
Explanation & Concept
• PersistentVolume (PV): A piece of storage in the cluster provisioned by an administrator or dynamically provisioned using StorageClasses. • PersistentVolumeClaim (PVC): A user's request for storage, specifying size and access modes (`ReadWriteOnce`, `ReadWriteMany`).
Code Example
yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: db-data-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20GiHow It Works & Key Takeaways
Pods mount the PVC without needing to know whether the physical storage is an AWS EBS volume, Google Persistent Disk, or NFS share.
Mock Test · 1 Questions · Optional
Ready for StatefulSets?
Take a quick test to evaluate yourself, or move straight to the next module.
Intermediate1 questions