
"The solution? 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"
"Let's write some code to see the first feature i.e. In-Place Pod Resource Resize minikube start --kubernetes-version=v1.35.0 apiVersion: v1kind: Podmetadata: name: resize-demospec: containers: - name: web-container image: nginx resources: requests: cpu: "200m" memory: "256Mi" limits: cpu: "500m" memory: "512Mi" resizePolicy: - resourceName: "cpu" restartPolicy: "NotRequired" - resourceName: "memory" restartPolicy: "NotRequired" kubectl apply -f resize-demo.yaml"
An abrupt traffic spike can require quicker CPU and memory adjustments to running pods. Previously Vertical Pod Autoscaler required recreating pods to change resources, causing connection drops, interruptions, and pain for stateful workloads. Kubernetes 1.35 introduces GA In-Place Pod Resource Resize that allows altering CPU and memory without destroying pods. The feature reduces downtime and avoids losing in-flight connections during resizing. Example steps include starting minikube with v1.35.0, defining pod resources and resizePolicy for CPU and memory with restartPolicy 'NotRequired', and applying the manifest to perform in-place updates.
Read at Medium
Unable to calculate read time
Collection
[
|
...
]