Delete a PVC (check reclaim policy first!)

Learning Kubernetes · 3:45

Listen on 93

Lyrics

[Verse 1]
Before you delete that storage claim
There's something you must check first
The reclaim policy holds the key
To avoid data loss at worst
Production volumes need retain
Development can use delete
Always verify the setting
Before you make the change complete

[Chorus]
Check the policy first, then kubectl delete
P-V-C by name, make it clean and neat
Retain for prod data, delete for test
Always check reclaim before you make a mess
Delete P-V-C, delete P-V-C
But check that policy first, that's the key

[Verse 2]
Storage classes are the way to go
Dynamic provisioning is best
Avoid creating volumes by hand
Let automation do the rest
Wait for first consumer mode
Ensures your pods and volumes align
Same zone deployment every time
Performance tuned and running fine

[Chorus]
Check the policy first, then kubectl delete
P-V-C by name, make it clean and neat
Retain for prod data, delete for test
Always check reclaim before you make a mess
Delete P-V-C, delete P-V-C
But check that policy first, that's the key

[Bridge]
Test your backups, test restore
For stateful workloads you depend
Recovery procedures must be known
Before disaster strikes again
Persistent volumes hold your state
So handle them with proper care

[Chorus]
Check the policy first, then kubectl delete
P-V-C by name, make it clean and neat
Retain for prod data, delete for test
Always check reclaim before you make a mess
Delete P-V-C, delete P-V-C
But check that policy first, that's the key

[Outro]
Storage management done right
Keeps your data safe and sound
Check reclaim, then delete clean
Best practices all around

← Create a service account | View token (K8s 1.24+ uses projected tokens) →