About Me

My photo
I am an MCSE in Data Management and Analytics, specializing in MS SQL Server, and an MCP in Azure. With over 19+ years of experience in the IT industry, I bring expertise in data management, Azure Cloud, Data Center Migration, Infrastructure Architecture planning, as well as Virtualization and automation. I have a deep passion for driving innovation through infrastructure automation, particularly using Terraform for efficient provisioning. If you're looking for guidance on automating your infrastructure or have questions about Azure, SQL Server, or cloud migration, feel free to reach out. I often write to capture my own experiences and insights for future reference, but I hope that sharing these experiences through my blog will help others on their journey as well. Thank you for reading!

Understanding PersistentVolume Reclaim Policies in Kubernetes

 In Kubernetes, there are different policies that can be set for a PersistentVolume (PV) to determine what happens to the data on the volume when the corresponding PersistentVolumeClaim (PVC) is deleted. These policies are known as "reclaim policies".



Here are the different reclaim policies in PV:


Retain: If the reclaim policy is set to Retain, the PV will not be deleted when the PVC is deleted. The PV will continue to exist with all its data intact. The administrator can manually reclaim the PV later.

Delete: If the reclaim policy is set to Delete, the PV will be deleted when the PVC is deleted. The data on the PV will be deleted as well. This policy is useful when you want to ensure that the storage space is released when the PVC is deleted.

Recycle: If the reclaim policy is set to Recycle, the PV will be deleted when the PVC is deleted. However, the data on the PV will not be deleted. Instead, the PV will be formatted and made available for a new PVC to use. This policy is useful when you want to reuse the PV for a new PVC with different data.

Note that the Recycle policy is deprecated and is not recommended for use in newer versions of Kubernetes. The Retain and Delete policies are the recommended policies to use.

No comments: