What is the difference between a PV, a PVC, and a StorageClass?
BeginnerScenarioConfiguration, Secrets and storage
Answer
Situation read → A newcomer is confused by three storage objects.
What I'd do →
- PV is the actual storage resource
- PVC is a request for storage by a user
- StorageClass defines how to dynamically provision PVs (provisioner, parameters, reclaim policy)
- Check with
kubectl get pv,pvc,sc - In practice you create PVCs and dynamic provisioning creates PVs
Why → The split separates admin concerns from developer requests.
Interview tip → Draw the binding relationship if there is a whiteboard.
More on Configuration, Secrets and storage
How do you inject configuration into pods and what are the options?BeginnerA ConfigMap was updated but the pod still shows old values. Why?IntermediateHow do you store a database password safely in Kubernetes?BeginnerHow do you manage secrets in GitOps without committing them in plain text?IntermediateA pod fails with `CreateContainerConfigError` and a missing key. What happened?BeginnerWhat is the difference between emptyDir, hostPath, PV/PVC and when do you use each?Beginner