Kubernetes Architect | Integration Expert | TIBCO Guru

FEATURED STORIES

Kubernetes Architect | Integration Expert | TIBCO Guru

Kubernetes In-Place Pod Resize: Scale a Pod Vertically Without Restarting It

Yes — Kubernetes can change the CPU and memory of a running pod without deleting it and, in most cases, without restarting its containers. The feature is called In-Place Pod Resize (the KEP calls it In-Place Pod Vertical Scaling), it has been stable since Kubernetes 1.35, and on any cluster at 1.33 or later it is already on by default. You trigger it by patching the pod’s resize subresource: kubectl patch pod checkout-7d9f8c6b5-x2lqp –subresource resize –patch \ ‘{“spec”:{“containers”:[{“name”:”app”,”resources”:{“requests”:{“cpu”:”1″},”limits”:{“cpu”:”2″}}}]}}’ The kubelet updates the container’s cgroup, the pod keeps its name, IP, node and in-memory state, and restartCount stays where it was.…