Bitzu

KCNA ยท Storage and troubleshooting

PV, PVC and StorageClass: how do they fit together?

PV, PVC, binding, access modes, reclaim policy, StorageClass and dynamic provisioning.

Key points

  • A PersistentVolume is a piece of cluster storage.
  • A PersistentVolumeClaim is a user's request for storage of a given size and access mode; the control plane binds it one-to-one to a matching PV.
  • A StorageClass describes a tier of storage so a PV can be provisioned dynamically when a claim asks for it.

Source: https://kubernetes.io/docs/concepts/storage/persistent-volumes/

Practice questions

Single choice

Which reclaim policy keeps the PV and its data after the claim is deleted?

  1. Archive
  2. Retain
  3. Delete
  4. Release
Show answer

Answer: B. Retain

Retain leaves the volume and its data for an administrator to handle manually. Delete removes the PV and the backing storage.

Select all that apply

Which of these are valid PersistentVolume access modes?

  1. ReadWriteAll
  2. WriteOnceMany
  3. ReadWriteOnce
  4. ReadOnlyMany
  5. ReadWriteOncePod
Show answer

Answer: C. ReadWriteOnce, D. ReadOnlyMany, E. ReadWriteOncePod

ReadWriteOnce, ReadOnlyMany and ReadWriteOncePod are real access modes (ReadWriteMany is a fourth). ReadWriteAll and WriteOnceMany do not exist.

True or false

True or false: a PersistentVolumeClaim can be bound to several PersistentVolumes at the same time to add up their capacity.

Show answer

Answer: False

False. Binding is one-to-one: one claim and one PV reference each other.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More KCNA topics in this module