Can I change my Kubernetes StorageClass reclaim policy without losing data?

July 1, 2025 1 answer
Asked by apron.strings
Hey folks, I'm working with a StorageClass in my Kubernetes setup that currently has the reclaimPolicy set to Delete. I'm looking to update this to Retain so that any persistent volume data stays put even after the PVCs are deleted. My main concern is that I don't want to lose any existing data in the PVCs that are already linked to this StorageClass. Any insights on how to do this safely?

Answers

thermal socks
You can just edit the StorageClass and change the reclaimPolicy to Retain. Just keep in mind that this change might not apply retroactively to existing PVCs.

_read the label: Yeah, but changing it like that could create new PVCs and PVs, which means you might end up losing your existing data.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions