Kubernetes Blog
Follow
Kubernetes v1.35: Mutable PersistentVolume Node Affinity (alpha)
Kubernetes v1.35 introduces mutable PersistentVolume (PV) node affinity, allowing changes to volume accessibility post-creation. This feature, previously immutable, facilitates online volume management, addressing evolving storage provider capabilities. The primary motivation stems from scenarios like regional disk migrations and disk upgrades where node access changes. For instance, migrating from zonal to regional disks necessitates adjusting the PV node affinity to reflect the new region. Likewise, upgrading disks may require specifying newer node generations. While enabling this, administrators must ensure the underlying volume is updated before modifying the PV node affinity. A race condition may occur during tightening node affinity if the scheduler doesn't immediately reflect the changes. Currently, the Kubelet failing Pod startup when node affinity is violated is being discussed as a possible mitigation. The goal is to integrate this with VolumeAttributesClass, allowing automated updates via PersistentVolumeClaim. This alpha feature requires enabling a feature gate and appropriate RBAC permissions. The Kubernetes community encourages feedback from users and CSI driver developers regarding its implementation and usability. This is considered a first step towards more flexible and dynamic volume management.