AI & ML

Kubernetes v1.35 Introduces Enhanced Mutable PersistentVolume Node Affinity

Jan 08, 2026 5 min read views

In the latest Kubernetes release, version 1.35, a significant transformation in the handling of PersistentVolumes (PVs) is underway. The node affinity API is now mutable, allowing administrators to adjust volume access dynamically—a shift that caters to the evolving needs of modern cloud storage management. This change isn’t just a minor tweak; it redefines how storage can be utilized in Kubernetes, addressing longstanding challenges that have affected stateful applications in the cloud.

Why the Shift to Mutable Node Affinity?

The heart of this change lies in the mutable nature of node affinity, which now allows Kubernetes operators to modify the affinity rules governing PV access without requiring volume recreation. Traditionally, PVs have been binding legal documents that dictated which nodes could access them based on predefined properties. However, as user requirements evolve—especially with the introduction of regional disks and the capabilities for live migration—there’s a need for flexibility in directing workloads. In Kubernetes, stateless workloads can adapt quickly; stateful ones, conversely, demand a more nuanced touch.

Flexibility is essential. While cloud storage providers now offer features such as live migrations from zonal to regional disks, the static node affinity mechanism stifled the ability to schedule pods efficiently across different zones. Kubernetes maintained a rigid stance on scheduling by adhering strictly to the existing PV node affinity conditions. With this update, cluster administrators are empowered to modify these conditions in real time, facilitating seamless adaptations to the underlying storage infrastructure.

Practical Scenarios and Configuration Examples

Consider a typical scenario: a storage provider rolls out a new generation of disks with superior performance metrics. The older nodes might not support these newer technologies, thus necessitating an update to the node affinity associated with certain PVs. Previously, such changes would risk downtime or data loss; now, administrators can actively update the node affinity settings without disrupting ongoing workloads.

Through a couple of YAML configuration examples, one can see how to modify node affinity settings. For instance, changing the affinity to accommodate a broader regional access may involve a configuration from:

spec: nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: topology.kubernetes.io/zone operator: In values: - us-east1-b

to a revised configuration reflecting broader access across regions:

spec: nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: topology.kubernetes.io/region operator: In values: - us-east1

Addressing Potential Pitfalls: Race Conditions in Scheduling

It’s worth considering the potential hurdles that accompany this newfound flexibility. One notable concern is the race condition that may occur when the underlying volume has been modified, but the scheduler’s cache has yet to refresh. Tightening node affinity, for instance, could result in scenarios where a pod is mistakenly scheduled on an incompatible node, causing the pod to stall in a ContainerCreating state. Until the Kubernetes community develops a robust solution, such as failing pod startups that violate PV affinity, those utilizing the mutable affinity feature must vigilantly monitor their deployments.

Looking Ahead: Integration with CSI

For Kubernetes to synchronize the handling of PVs with the broader storage ecosystem seamlessly, an integration with the Container Storage Interface (CSI) is on the horizon. The ambition is to automate updates in node affinities based on modifications in the storage provider, minimizing administrative workload and errors. This level of sophistication would not only streamline operations but also improve overall system resilience and reliability—traits that are vital in dynamic cloud environments.

The Call for Community Input

As Kubernetes transitions to this new paradigm, feedback from users and developers will be fundamental to its success. The community is encouraged to share experiences, propose enhancements, and explore the API's future capabilities. Engaging channels include the Kubernetes Slack, mailing lists, and specific KEP discussions dedicated to mutable PV node affinity. This collaborative approach will help shape a feature that truly meets the demands of a fast-evolving landscape of cloud-native storage.

In essence, this shift towards mutable node affinity underscores Kubernetes' commitment to flexibility and responsiveness in cloud-native environments. For administrators, it’s a pivotal opportunity to modernize stateful workloads without compromising data integrity—a long-awaited development that promises to enhance the Kubernetes experience significantly.