Kubernetes can now change a running Pod's CPU and memory without recreating it. In-place Pod resize graduated to stable in Kubernetes 1.35, and you trigger it by patching the Pod's resize subresource with kubectl patch --subresource resize (kubectl 1.32 or newer). Whether the container restarts is controlled per resource by resizePolicy. CPU changes usually apply live; memory changes often need a restart, because many runtimes can't adjust heap size on the fly.

This tutorial walks through a working example, the status conditions you need to watch, what can't be resized, how VPA uses the feature, and what changed in 1.36 and 1.37.

Version requirements and feature status

Item Status (November 2026) Source
In-place resize of container CPU/memory Alpha 1.27, beta 1.33, stable 1.35 (feature gate locked on) Resize task docs
kubectl ... --subresource resize Requires kubectl client v1.32.0+ Same
Memory limit decrease Allowed since 1.35, best-effort OOM protection 1.35 GA blog
Pod-level resources resize (KEP-5419) Alpha 1.35, beta 1.36 (on by default) 1.36 blog
Scheduler preemption for deferred resizes Alpha 1.37, off by default 1.37 blog
Resize of memory-backed emptyDir volumes Alpha 1.37, off by default, cgroup v2 only Resize task docs
VPA InPlaceOrRecreate mode GA in VPA 1.6.0 VPA features doc

The upstream project currently maintains 1.37, 1.36 and 1.35 (releases page), so every supported Kubernetes version has the stable feature.

Managed Kubernetes availability

Provider First version with GA in-place resize Notes
Amazon EKS 1.35, released on EKS 27 January 2026 EKS supports all GA Kubernetes APIs; 1.34 to 1.37 are in standard support
GKE 1.35 GKE's release notes list "In-place Pod Resize is now GA" under new features in 1.35
AKS 1.35, AKS GA March 2026 AKS release calendar; 1.37 went GA in October 2026

Upgrade your nodes as well as your control plane. Resize is carried out by the kubelet, so it depends on node versions too.

How in-place resize works

Three fields matter:

  • spec.containers[*].resources is the desired state. CPU and memory requests and limits are now mutable through the resize subresource.
  • status.containerStatuses[*].resources is what is actually configured on the running container. Monitor this one.
  • status.containerStatuses[*].allocatedResources is what the kubelet has admitted. It is mostly used internally for scheduling.

When desired and actual differ, the kubelet checks whether the node has room, updates the container's cgroups through the runtime, and reports progress through Pod conditions. While a resize is pending or incomplete, the scheduler counts the larger of desired, allocated and actual requests for that Pod, so it won't overcommit the node in the meantime.

Note that this works on Pods. If you change resources in a Deployment's Pod template, the Deployment rolls out new Pods as it always has. In-place resize is for controllers and operators that patch live Pods (VPA is the main one) or for hands-on intervention. If you resize a Deployment's Pods by hand, update the template too, or the next rollout or reschedule brings back the old values.

Hands-on: resize a running Pod

This example follows the official task. Start with a namespace and a Pod whose CPU can change live but whose memory changes require a restart.

kubectl create namespace qos-example
# pod-resize.yaml
apiVersion: v1
kind: Pod
metadata:
  name: resize-demo
  namespace: qos-example
spec:
  containers:
  - name: pause
    image: registry.k8s.io/pause:3.8
    resizePolicy:
    - resourceName: cpu
      restartPolicy: NotRequired      # default, explicit here
    - resourceName: memory
      restartPolicy: RestartContainer
    resources:
      limits:
        memory: "200Mi"
        cpu: "700m"
      requests:
        memory: "200Mi"
        cpu: "700m"
kubectl create -f pod-resize.yaml
kubectl get pod resize-demo -n qos-example \
  -o jsonpath='{.status.containerStatuses[0].resources}{"\n"}{.status.containerStatuses[0].restartCount}{"\n"}'

Requests equal limits, so this Pod is in the Guaranteed QoS class. Remember that, because a resize can't change it.

Step 1: increase CPU without a restart

kubectl patch pod resize-demo -n qos-example --subresource resize --patch \
  '{"spec":{"containers":[{"name":"pause","resources":{"requests":{"cpu":"800m"},"limits":{"cpu":"800m"}}}]}}'

Both spec.containers[0].resources and status.containerStatuses[0].resources should show 800m, and restartCount should still be 0. You can also edit or apply instead of patching:

kubectl -n qos-example edit pod resize-demo --subresource resize
kubectl -n qos-example apply -f pod-resize.yaml --subresource resize --server-side

If kubectl reports an invalid subresource error, your client is older than 1.32.

Step 2: increase memory, which restarts the container

kubectl patch pod resize-demo -n qos-example --subresource resize --patch \
  '{"spec":{"containers":[{"name":"pause","resources":{"requests":{"memory":"300Mi"},"limits":{"memory":"300Mi"}}}]}}'

Because the memory policy is RestartContainer, restartCount goes to 1. The Pod keeps its name, IP, node and volumes; only the container process restarts. That is still much less disruptive than recreating the Pod.

Step 3: watch an infeasible request fail safely

kubectl patch pod resize-demo -n qos-example --subresource resize --patch \
  '{"spec":{"containers":[{"name":"pause","resources":{"requests":{"cpu":"1000"},"limits":{"cpu":"1000"}}}]}}'

kubectl get pod resize-demo -n qos-example \
  -o jsonpath='{range .status.conditions[*]}{.type}{"\t"}{.reason}{"\t"}{.message}{"\n"}{end}'

Asking for 1,000 cores gives a PodResizePending condition with reason Infeasible. The spec shows the impossible value, but status.containerStatuses[0].resources keeps the last applied values and nothing restarts. To recover, patch again with values that fit. Clean up with kubectl delete namespace qos-example.

resizePolicy: NotRequired vs RestartContainer

restartPolicy value Behavior Use for
NotRequired (default) Kubelet updates cgroups on the running container CPU almost always; memory only if the app adapts to a new limit
RestartContainer Container restarts to pick up the new values Memory for JVMs, Python and anything that sizes itself at startup

The rules from the docs:

  • If you don't set a policy for a resource, it defaults to NotRequired.
  • If a single patch changes both CPU (NotRequired) and memory (RestartContainer), the container restarts. The strictest policy wins.
  • If the Pod-level restartPolicy is Never, every container's resize policy must be NotRequired.

The 1.35 announcement says plainly that "Java and Python runtimes do not support resizing memory without restart." Raising a cgroup memory limit under a JVM started with a fixed -Xmx gives it no more heap. Lowering the limit under it invites an OOM kill. For those workloads, use RestartContainer for memory and keep NotRequired for CPU.

Reading resize status

The kubelet reports progress with two Pod conditions:

Condition Reason Meaning
PodResizePending Infeasible Can't be done on this node, for example more than node capacity
PodResizePending Deferred Not possible now but may be later; the kubelet retries
PodResizeInProgress (none, or Error) Admitted and being applied; actuation errors appear in message

When several resizes are deferred on one node, the kubelet retries them in this order: higher PriorityClass first, then Guaranteed before Burstable, then the oldest deferral. To check whether the kubelet has seen your latest change, compare metadata.generation with status.observedGeneration:

kubectl get pod resize-demo -n qos-example \
  -o jsonpath='{.metadata.generation}{" "}{.status.observedGeneration}{"\n"}'

The conditions also carry their own observedGeneration, so you can tell which spec generation a pending or in-progress resize refers to. Since 1.35 there are also resize-specific kubelet metrics and Pod events. GKE's release notes, for example, mention a ResizeCompleted event.

What you can't resize (as of 1.37)

The limitations section for Kubernetes 1.37:

  • Only CPU and memory. GPUs, ephemeral storage and extended resources remain immutable.
  • QoS class is fixed at creation. Guaranteed Pods must keep requests equal to limits. Burstable Pods can't make requests equal limits for both CPU and memory. BestEffort Pods can't gain requests or limits.
  • No removing requests or limits once set; you can only change values.
  • Memory limit decreases are best-effort. With NotRequired, the kubelet skips the decrease if current usage is above the new limit, and the Pod stays "In Progress". There is still a race if usage spikes right after the check.
  • No Windows Pods.
  • No Pods under the static CPU Manager or Memory Manager policies.
  • Swap: Pods using swap can resize memory only with RestartContainer.
  • Ephemeral containers can't be resized. Sidecars can. Non-restartable init containers can be resized while running, but not with RestartContainer.

cgroup v2 and runtime requirements

Kubernetes deprecated cgroup v1 in 1.35, and the kubelet no longer starts on a cgroup v1 node by default (you'd have to set failCgroupV1: false). The docs require cgroup v2 for pod-level resize and for memory-backed emptyDir resize. In practice, any 1.35+ node you build today should be on cgroup v2.

For pod-level resize, the 1.36 announcement requires a runtime that supports the CRI UpdateContainerResources call and gives containerd v2.0+ or CRI-O as examples. For container-level resize, check your runtime's release notes for its supported versions instead of assuming.

Using in-place resize with VPA

Most teams won't patch Pods by hand. The Vertical Pod Autoscaler's InPlaceOrRecreate mode went GA in VPA 1.6.0 (February 2026) and is enabled by default. The current release line is 1.8.x.

apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
  name: api-vpa
spec:
  targetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: api
  updatePolicy:
    updateMode: "InPlaceOrRecreate"

VPA tries an in-place update first and falls back to evicting the Pod when the resize is infeasible, has been deferred for more than 5 minutes, has been in progress for more than an hour, or would change the QoS class. All containers in a Pod are updated together.

Two newer options are worth knowing about:

  • --in-place-skip-disruption-budget on the updater (beta as of VPA 1.7.0) skips eviction-tolerance checks when every container uses NotRequired, since such updates don't disrupt anything.
  • An InPlace update mode that never evicts arrived as alpha in VPA 1.7.0 behind the InPlace feature gate. It is the right fit for workloads where a restart is worse than running under-provisioned.

VPA keeps writing its recommendations to live Pods; your Deployment manifest still holds the original requests. That is expected, but make sure your GitOps tool doesn't fight VPA over the Pods. For node-side right-sizing to go with it, see our Karpenter vs Cluster Autoscaler guide.

Pod-level resources resize (1.36 beta)

Pod-level resources (spec.resources) set one budget shared by all containers in the Pod. In 1.36, resizing that budget in place became beta and enabled by default behind the InPlacePodLevelResourcesVerticalScaling gate, together with PodLevelResources, InPlacePodVerticalScaling and NodeDeclaredFeatures. Doubling the CPU budget of the shared-pool Pod from the announcement looks like this:

kubectl patch pod shared-pool-app --subresource resize --patch \
  '{"spec":{"resources":{"limits":{"cpu":"4"}}}}'

There is no Pod-level resize policy. Each container's own resizePolicy decides whether it restarts. That has a non-obvious consequence: a container with no CPU limit of its own inherits the Pod-level limit, so raising the Pod limit counts as a CPU change for that container. If its CPU policy is RestartContainer, it restarts. Validation also requires Pod-level requests to stay at or above the sum of container requests, and every container limit to stay at or below the Pod-level limit. It is Linux-only and needs cgroup v2.

What's new in 1.37

  • Scheduler preemption for deferred resizes (alpha). With InPlacePodVerticalScalingSchedulerPreemption enabled on the API server, scheduler and kubelet, the scheduler can evict lower-priority Pods on the same node so a higher-priority Pod's deferred resize can go through. Preemption only looks at that one node. Nodes can opt out through the new spec.podPreemptionPolicy.disableResizePreemption field.
  • Memory-backed emptyDir resize (alpha). The resize subresource can update sizeLimit on medium: Memory volumes behind InPlacePodVerticalScalingMemoryBackedVolumes.

Both are off by default. EKS doesn't support alpha features, and other managed services restrict them too, so treat these as previews.

Practical patterns

  • Startup boost: give JIT-heavy services extra CPU during startup, then patch it back down with NotRequired. VPA's CPU startup boost work (AEP-7862) automates this.
  • Shrink idle workers: reduce CPU on idle queue consumers and raise it again on the first job, without losing warm caches.
  • Bin-packing: right-size live Pods so the cluster autoscaler can consolidate nodes. Pair it with the cost tooling in our Kubernetes cost optimization roundup.

When scripting patches, validate the JSON first; a stray quote produces confusing kubectl errors. Any formatter works, including the one in our developer tools.

Frequently Asked Questions

Which Kubernetes version do I need for in-place pod resize?

In-place resize of container CPU and memory is stable from Kubernetes 1.35, where its feature gate is locked on. It was beta in 1.33 and 1.34 and alpha from 1.27. You also need kubectl 1.32 or newer for the --subresource resize flag. EKS, GKE and AKS all offer 1.35 and later.

Does resizing memory restart my container?

Only if the container's memory resizePolicy is RestartContainer. The default is NotRequired, which updates the cgroup live. Many runtimes, including Java and Python per the Kubernetes project, can't use a memory change without restarting, so RestartContainer is usually right for memory.

Can I decrease a memory limit in place?

Yes, since 1.35. The kubelet makes a best-effort check that current usage is below the new limit and skips the decrease if it isn't, leaving the resize in progress. The check can race with a sudden spike, so lower memory gradually on workloads close to their limit.

Why is my resize stuck in PodResizePending?

Infeasible means the node can never satisfy it, for example more CPU than the node has, so you must patch to a smaller value. Deferred means the node lacks free capacity right now; the kubelet retries when resources free up, ordered by priority and QoS class. In 1.37 the alpha scheduler preemption feature can evict lower-priority Pods to make room.

Can in-place resize change a Pod's QoS class?

No. QoS class is fixed when the Pod is created. A Guaranteed Pod must keep requests equal to limits, and a BestEffort Pod can't gain requests or limits. VPA falls back to recreating the Pod when a recommendation would change the QoS class.

Conclusion

In-place Pod resize is stable, available on every supported Kubernetes version and on all three major managed services. Use NotRequired for CPU and RestartContainer for memory on runtimes that size themselves at startup. Watch PodResizePending and PodResizeInProgress instead of assuming a patch worked, and let VPA's InPlaceOrRecreate mode do the routine right-sizing. Pod-level resize (beta in 1.36) and scheduler preemption (alpha in 1.37) close the remaining gaps. Try them on a test cluster, but keep production on the stable container-level path for now.