Kubernetes Blog
Follow
Kubernetes v1.34: Recovery From Volume Expansion Failure (GA)
Kubernetes v1.34 introduces a significant improvement: automated recovery from failed volume expansion. Previously, correcting expansion errors, such as specifying an incorrect storage size, required manual intervention and cluster-admin privileges. This new feature allows users to reduce the requested PVC size if a mistake is made during expansion, as long as the expansion hasn't completed. Kubernetes will then automatically correct the size, returning any consumed quota and resizing the PersistentVolume. An example illustrates how a user can correct a typo in storage request. The corrected size must still be larger than the original volume size, as shrinking volumes is not supported. The implementation involved a complete overhaul of volume expansion, introducing new API fields for monitoring the expansion's progress. Improved error handling and reporting are now present, with errors persisting as PVC conditions and retrying failed expansions at a slower rate. This feature also addresses long-standing bugs in the resizing workflow. Users are encouraged to report any issues encountered. The development of this feature benefited from the feedback and contributions of various individuals and the Kubernetes community.