Kubernetes and Cloud Native Associate (KCNA)Kubernetes FundamentalsEasy

An engineer is deploying a new microservice that requires persistent storage. The application needs to store user-uploaded files that must survive Pod restarts and rescheduling. Which Kubernetes object is primarily responsible for requesting and consuming persistent storage within a cluster?

  1. AVolumeAttachment
  2. BPersistentVolumeClaim (PVC)
  3. CStorageClass
  4. DPersistentVolume (PV)
Show answer & explanation

Correct answer: B. PersistentVolumeClaim (PVC)

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

Why the other options are wrong

  • A. VolumeAttachment is an internal Kubernetes object managed by the controller, not directly created by users to consume storage.
  • C. StorageClass defines classes of storage (e.g., 'fast', 'slow') but doesn't directly consume storage.
  • D. A PersistentVolume (PV) is a piece of storage provisioned by an administrator, not the request from the user.

PersistentVolumeClaim (PVC)

A request for storage by a user or application within a Kubernetes cluster.

  • Abstracts the underlying storage details from the user.
  • Binds to an available PersistentVolume (PV) that satisfies its requirements.
  • Can be specified in Pod definitions to mount storage.

Memory trick: PVC is like a 'Claim check' for your persistent storage 'luggage'.

More Kubernetes Fundamentals questions