In-Place Pod Resource Resize: Adjust CPU and Memory Without Restarts
Briefly

In-Place Pod Resource Resize: Adjust CPU and Memory Without Restarts
"Vertical Pod Autoscaler (VPA) springs into action - but it has to recreate every pod to apply the changes. The result: connection drops, service interruptions, and frustrated users. For years, Kubernetes developers have dealt with a frustrating limitation: adjusting pod resources meant destroying and recreating pods. For stateful workloads its even more painful and that changes with K8s 1.35 . In-Place Pod Resource Resize (now GA/stable) - allows CPU and memory adjustments without pod recreation"
"kubectl apply -f resize-demo.yaml Post applying the yaml configuration , we can observe the qvamjak% kubectl get pod resize-demo -o jsonpath='{.status.containerStatuses[0].resources.requests.cpu}'200mqvamjak% kubectl get podsNAME READY STATUS RESTARTS AGEresize-demo 1/1 Running 0 8m48s Now Let's Perform the In-Place Patch in version 1.35, we must use the --subresource=resize flag for the API to process this as an in-place update rather than a standard object update."
Kubernetes 1.35 makes In-Place Pod Resource Resize generally available, enabling CPU and memory changes without destroying and recreating pods. Vertical Pod Autoscaler previously required pod recreation to apply resource changes, causing connection drops and interruptions, especially for stateful workloads. In-place resizing uses the API --subresource=resize flag so the API treats the update as an in-place modification rather than a full object update. Example manifests set container requests, limits, and resizePolicy entries for cpu and memory. The kubectl patch command with --subresource=resize updates requests (for example, from 200m to 300m) without restarting containers. Minikube v1.35 can be used to test the feature.
Read at Medium
Unable to calculate read time
[
|
]