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
Which reclaim policy keeps the PV and its data after the claim is deleted?
- Archive
- Retain
- Delete
- 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.
Which of these are valid PersistentVolume access modes?
- ReadWriteAll
- WriteOnceMany
- ReadWriteOnce
- ReadOnlyMany
- 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: 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.
