Kubernetes v1.34: Automated Volume Expansion Recovery
Have you ever made a typo when expanding your persistent volumes in kubernetes? Meant to specify 2TB but specified 20TiB? This seemingly innocuous problem was previously quite difficult to fix – and took the project almost 5 years to resolve. With the v1.34 release, automated recovery from storage expansion has graduated to general availability.
Understanding the Problem
Previously, recovering from failed volume expansions required cluster-admin access and was a tedious process. Imagine accidentally requesting 1000TB instead of 100TB for your database server. Now, kubernetes v1.34 offers a solution to automatically correct these mistakes.
Recovering From Failed Expansion
With kubernetes v1.34, you can reduce the requested size of the PersistentVolumeClaim (PVC) if the expansion to the previously requested size hasn’t finished. Kubernetes will then work to correct the issue automatically. Any quota consumed by the failed expansion is returned to the user, and the associated PersistentVolume is resized to the latest specified size.
Reducing PVC Size: An Example
Let’s say you’re expanding a PVC from 10TB to 100TB but mistakenly specify 1000TB. You might be out of disk space or quota, preventing the expansion. In v1.34, you can now correct your mistake by requesting a size of 100TB (which must still be greater than the original 10TB). Kubernetes will handle the correction without manual intervention.
Improved Error Handling and Observability
The implementation of this feature also addressed long-standing bugs in resizing workflows and improved error handling. You can now monitor progress using new API fields within PVC objects, including .status.allocatedResourceStatus['storage'].
Observing Expansion Progress
This field transitions through states like ControllerResizeInProgress, NodeResizePending and NodeResizeInProgress before completion. Furthermore, if expansion is infeasible, it will be in a state such as ControllerResizeInfeasible or NodeResizeInfeasible.
Enhanced Error Reporting
Kubernetes now retries failed expansions at a slower rate and populates pvc.status.conditions with error keys like ControllerResizeError or NodeResizeError, providing more detailed information about failures. In addition, this simplifies troubleshooting significantly.
Conclusion
Kubernetes v1.34 introduces a significant improvement in volume expansion management, automating recovery from errors and enhancing observability. This feature simplifies cluster administration and reduces the potential for manual intervention, making kubernetes even more user-friendly. Therefore, this update is a valuable step towards improving operational efficiency.
Source: Read the original article here.
Discover more tech insights on ByteTrending.
Discover more from ByteTrending
Subscribe to get the latest posts sent to your email.












