Kubernetes 1.31: Prevent Persi... Note

Kubernetes 1.31: Prevent PersistentVolume Leaks When Deleting out of Order

PersistentVolume (PV) reclaim policy determines actions taken by the storage backend upon PVC deletion. Kubernetes v1.31 introduces a beta feature to ensure the reclaim policy is honored.Previously, deleting a PV before the bound PVC would ignore the reclaim policy, leaving the underlying storage resource intact.The new behavior adds a finalizer to PVs, preventing deletion until the storage backend confirms the resource has been removed.This applies to CSI volumes, with finalizer external-provisioner.volume.kubernetes.io/finalizer, and dynamically provisioned in-tree plugin volumes with finalizer kubernetes.io/pv-controller.To enable the new behavior, upgrade to Kubernetes v1.31 and use CSI external-provisioner version 5.0.1 or later.The fix does not apply to statically provisioned in-tree plugin volumes.CSI migrated volumes are also affected by the change.The Kubernetes Slack channel SIG Storage is a resource for reaching the SIG Storage and migration working group teams.Joining the Kubernetes Storage Special Interest Group (SIG) is encouraged for involvement in CSI and Kubernetes Storage system development.