study.

Binding PVs and PVCs · CKA

A PVC requests storage, and a PV represents the storage resource bound to that request.

← CKA

Learn with progress and quizzes

First, understand the concepts.

Binding requirements

A PV must satisfy requirements such as capacity, access modes, and StorageClass. With dynamic provisioning, a provisioner can create the PV.

Why Pending?

There may be no suitable PV or the provisioner may have a problem. With WaitForFirstConsumer, binding can wait until a consuming Pod is scheduled.

Why it matters

A PVC requests storage while a PV represents a storage resource. Before waiting indefinitely on Pending, identify which matching or provisioning condition is unmet.

Work through the reasoning

Compare the requirements

Read capacity, accessModes, volumeMode, and StorageClass. For static provisioning, compare candidate PVs and check whether another claim already owns them.

Read binding timing

Dynamic provisioning needs a StorageClass and driver. WaitForFirstConsumer can defer allocation until Pod placement is known. Inspect both PVC and consumer Pod events before declaring failure.

Learn by doing.

You need kubectl and access to your own practice Kubernetes cluster. Each lab is independent. Check your current context first, then run the commands in your own terminal.

List storage resources in your cluster. If PVCs exist, inspect their status and events.

kubectl get storageclasses
kubectl get persistentvolumes
kubectl get persistentvolumeclaims -A
kubectl explain pvc.spec.accessModes

How to check your result

A cluster without PVCs is also valid. Explain Bound and Pending and how they relate to StorageClasses.

Apply what you learned

A PVC is Pending with WaitForFirstConsumer, and no Pod consumes it yet. What should you do first?

Reveal the reasoning after trying

Check whether this is expected delayed binding. A valid consumer Pod can supply placement information needed to proceed. Inspect class settings and consumer existence before reinstalling a driver.

Ready to check your understanding?

With WaitForFirstConsumer, what does a PVC wait for?

  1. The first kubectl get
  2. Scheduling of a Pod that uses the volume
  3. A cluster reboot
  4. Midnight each day
Reveal the reasoning after trying

Scheduling of a Pod that uses the volume

It waits for the first consumer’s scheduling so that volume provisioning can take the Pod’s placement constraints into account.

Kubernetes documentation