Interview Prep/Kubernetes/Configuration, Secrets and storage

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 →

  1. PV is the actual storage resource
  2. PVC is a request for storage by a user
  3. StorageClass defines how to dynamically provision PVs (provisioner, parameters, reclaim policy)
  4. Check with kubectl get pv,pvc,sc
  5. 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.

All Kubernetes questions Roadmap: Kubernetes core

More on Configuration, Secrets and storage