Kubernetes and Cloud Native Associate (KCNA)Kubernetes FundamentalsMedium

A developer is configuring a Pod that needs to store data persistently even if the Pod restarts or is moved to a different node. They want to request a specific amount of storage from the cluster. Which Kubernetes object is used by a Pod to claim a piece of persistent storage?

  1. AStorageClass
  2. BPersistentVolume (PV)
  3. CPersistentVolumeClaim (PVC)
  4. DVolume
Show answer & explanation

Correct answer: C. PersistentVolumeClaim (PVC)

A PersistentVolumeClaim (PVC) is a request for storage by a user. It abstracts the underlying storage details and allows a Pod to consume a PersistentVolume without knowing the specifics of the storage provider.

Why the other options are wrong

  • A. A StorageClass defines classes of storage (e.g., 'fast', 'slow'), allowing for dynamic provisioning, but is not the claim itself.
  • B. A PersistentVolume (PV) is a piece of storage in the cluster, provisioned by an administrator, not directly claimed by a Pod.
  • D. A Volume is a general storage unit for a Pod, but for *persistent* storage that outlives the Pod, a PVC is typically used to bind to a PV.

PersistentVolumeClaim (PVC)

A request for storage by a user (or Pod) in Kubernetes, abstracting away the details of the underlying storage system.

  • Used by Pods to consume PersistentVolumes.
  • Specifies desired storage size, access modes, and StorageClass.
  • Provides persistent storage that outlives Pods.

Memory trick: The PVC is your 'claim ticket' for persistent storage.

More Kubernetes Fundamentals questions