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

0
5
Asked By CloudySky123 On

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?

1 Answer

Answered By TechWiz45 On

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.

DataGuru88 -

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

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.