Kubernetes has released version 1.33, bringing a notable upgrade in storage management designed to prevent PersistentVolume (PV) leaks during deletion. This feature, now in General Availability (GA), tackles a significant issue where deleting PersistentVolumeClaims (PVCs) and their corresponding PVs out of order caused storage resources to remain unallocated.
In earlier versions, if a PV was deleted before its associated PVC, the set reclaim policy would go ignored, causing storage assets to stay assigned in the external system. The latest implementation guarantees that the Delete reclaim policy works consistently, even with out-of-order PV deletions. Finalizers now ensure the integrity of storage resource management.
For Container Storage Interface (CSI) volumes, the finalizer is marked as external-provisioner.volume.kubernetes.io/finalizer. This prevents a PV from being deleted until confirmation comes that the storage backend has successfully released the allocated resource. Additionally, there’s a finalizer called kubernetes.io/pv-controller for dynamically provisioned in-tree plugin volumes. However, this fix does not affect statically provisioned in-tree plugin volumes.
To take advantage of this functionality, upgrade to Kubernetes v1.33 and run version 5.0.1 or later of the CSI external-provisioner. This enhancement represents a meaningful advancement in achieving efficient storage management within Kubernetes environments, boosting overall operational reliability.
For more details, visit the Kubernetes Blog.