0
0
Kubernetesdevops~5 mins

Reclaim policies (Retain, Delete) in Kubernetes - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a reclaim policy in Kubernetes Persistent Volumes?
A reclaim policy tells Kubernetes what to do with a Persistent Volume after its claim is deleted. It can either keep the volume (Retain) or remove it (Delete).
Click to reveal answer
beginner
What does the 'Retain' reclaim policy do?
The 'Retain' policy keeps the Persistent Volume and its data even after the Persistent Volume Claim is deleted. The volume must be manually cleaned or reused.
Click to reveal answer
beginner
What happens when the reclaim policy is set to 'Delete'?
When set to 'Delete', Kubernetes automatically deletes the Persistent Volume and its underlying storage when the Persistent Volume Claim is deleted.
Click to reveal answer
intermediate
Which reclaim policy is safer for preserving data after a claim is deleted?
The 'Retain' policy is safer because it keeps the data intact and requires manual cleanup, preventing accidental data loss.
Click to reveal answer
intermediate
How do you specify a reclaim policy in a Persistent Volume YAML?
You add the field 'persistentVolumeReclaimPolicy' with value 'Retain' or 'Delete' under the Persistent Volume spec.
Click to reveal answer
What does the 'Delete' reclaim policy do in Kubernetes Persistent Volumes?
AKeeps the volume and data after claim deletion
BLocks the volume to prevent deletion
CArchives the volume for backup
DDeletes the volume and data after claim deletion
Which reclaim policy requires manual cleanup of the volume?
ARetain
BRecycle
CDelete
DArchive
Where do you set the reclaim policy in a Persistent Volume configuration?
Aspec.accessModes
Bmetadata.labels
Cspec.persistentVolumeReclaimPolicy
Dspec.storageClassName
If you want to keep data safe after a claim is deleted, which reclaim policy should you choose?
ARetain
BDelete
CRecycle
DNone
What happens to the underlying storage when reclaim policy is 'Delete' and claim is deleted?
AStorage is preserved for reuse
BStorage is deleted automatically
CStorage is backed up
DStorage is locked
Explain the difference between 'Retain' and 'Delete' reclaim policies in Kubernetes Persistent Volumes.
Think about what happens to the volume after the claim is deleted.
You got /4 concepts.
    Describe how to set a reclaim policy in a Persistent Volume YAML file.
    Look inside the spec section of the YAML.
    You got /3 concepts.