Kubernetes 1.35 In-Place Pod Resize: The Complete Guide to Resizing Without Restarts
In-Place Pod Resize is now GA in Kubernetes 1.35. Change CPU and memory on running pods without restarts. Here's everything you need to know.
For years, the biggest complaint about Kubernetes resource management was simple: you can't change CPU or memory on a running pod without restarting it.
Want to give a pod more memory because it's approaching its limit? Restart. Want to reduce CPU on an over-provisioned workload? Restart. Running a JVM that took 2 minutes to warm up? Too bad — restart.
That era is officially over. In-Place Pod Resize graduated to GA in Kubernetes 1.35, and it changes how we think about resource management in Kubernetes.
What Is In-Place Pod Resize?
In-Place Pod Resize allows you to modify a pod's CPU and memory resource requests and limits while the pod is running — no restart required.
Before this feature, the only way to change resources was:
- Update the Deployment spec
- Kubernetes kills the old pod
- Kubernetes creates a new pod with new resources
- Application restarts from scratch
Now, you can patch a running pod's resources, and the Linux kernel adjusts the cgroup limits on the fly. The container keeps running without interruption.
How It Works Under the Hood
When you resize a pod:
- You patch the pod's
spec.containers[*].resourcesfield - The kubelet receives the update
- Kubelet updates the container's cgroup limits in the Linux kernel
- The container process doesn't even know it happened
For CPU, this is seamless — the cgroup CPU quota changes immediately.
For memory, it's slightly more nuanced:
- Increasing memory: Always succeeds if the node has capacity
- Decreasing memory: Only succeeds if the container is using less than the new limit
Trying It Out
Prerequisites
- Kubernetes 1.35+ (feature gate
InPlacePodVerticalScalingis enabled by default) - Container runtime: containerd 1.7+ or CRI-O 1.28+
Step 1 — Create a Pod with Resize Policy
apiVersion: v1
kind: Pod
metadata:
name: resize-demo
spec:
containers:
- name: app
image: nginx:1.27
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 200m
memory: 256Mi
resizePolicy:
- resourceName: cpu
restartPolicy: NotRequired
- resourceName: memory
restartPolicy: NotRequiredThe resizePolicy field tells Kubernetes whether a restart is needed for each resource type. NotRequired means in-place resize — RestartContainer means the container restarts on change.
Step 2 — Resize the Pod
Increase CPU and memory without restarting:
kubectl patch pod resize-demo --subresource resize --patch '{
"spec": {
"containers": [{
"name": "app",
"resources": {
"requests": {"cpu": "200m", "memory": "256Mi"},
"limits": {"cpu": "400m", "memory": "512Mi"}
}
}]
}
}'Step 3 — Check the Resize Status
kubectl get pod resize-demo -o jsonpath='{.status.resize}'Possible values:
Proposed— resize requested, not yet appliedInProgress— kubelet is applying changesDeferred— insufficient resources on node, will retryInfeasible— resize cannot be fulfilled (e.g., exceeds node capacity)- Empty — resize completed successfully
Verify the actual resources:
kubectl get pod resize-demo -o jsonpath='{.status.containerStatuses[0].resources}'Using In-Place Resize with Deployments
In-Place Pod Resize works at the pod level. When you update a Deployment's resource spec, Kubernetes still does a rolling update (creating new pods). To resize without rolling updates, patch pods directly.
However, you can combine it with VPA (Vertical Pod Autoscaler) for automatic in-place resizing.
VPA with In-Place Resize Mode
VPA now supports a new update mode: InPlaceOrRecreate. This tells VPA to try in-place resize first, and only restart the pod if in-place isn't possible.
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: my-app-vpa
spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: my-app
updatePolicy:
updateMode: "InPlaceOrRecreate"
resourcePolicy:
containerPolicies:
- containerName: app
minAllowed:
cpu: 50m
memory: 64Mi
maxAllowed:
cpu: 2000m
memory: 4GiWith this configuration:
- VPA monitors your workload's actual resource usage
- When it recommends a change, it patches the pod's resources in-place
- If in-place resize fails (e.g.,
Infeasible), it falls back to evicting and recreating the pod - No more surprise restarts for resource adjustments
Install VPA with in-place support:
git clone https://github.com/kubernetes/autoscaler.git
cd autoscaler/vertical-pod-autoscaler
./hack/vpa-up.shReal-World Use Cases
Java/JVM Applications
JVM apps take minutes to warm up. Before in-place resize, scaling resources meant cold starts. Now:
# App is hitting memory limits, increase without restart
kubectl patch pod java-app-abc123 --subresource resize --patch '{
"spec": {
"containers": [{
"name": "java-app",
"resources": {
"requests": {"memory": "2Gi"},
"limits": {"memory": "4Gi"}
}
}]
}
}'The JVM keeps running with its warm caches, compiled code, and established connections.
Batch Processing Jobs
Jobs that need different resources at different stages:
# Data loading phase - need more memory
kubectl patch pod batch-job-xyz --subresource resize --patch '{
"spec": {"containers": [{"name": "worker", "resources": {"limits": {"memory": "8Gi"}}}]}
}'
# Processing phase - need more CPU
kubectl patch pod batch-job-xyz --subresource resize --patch '{
"spec": {"containers": [{"name": "worker", "resources": {"limits": {"cpu": "4"}}}]}
}'Traffic Spike Handling
Scale pod resources during known peak periods:
# Before Black Friday sale
for pod in $(kubectl get pods -l app=web -o name); do
kubectl patch $pod --subresource resize --patch '{
"spec": {"containers": [{"name": "web", "resources": {"limits": {"cpu": "2", "memory": "2Gi"}}}]}
}'
done
# After peak
for pod in $(kubectl get pods -l app=web -o name); do
kubectl patch $pod --subresource resize --patch '{
"spec": {"containers": [{"name": "web", "resources": {"limits": {"cpu": "500m", "memory": "512Mi"}}}]}
}'
doneLimitations to Know
-
Node capacity — you can't resize beyond what the node can offer. If the node is at capacity, the resize is
DeferredorInfeasible. -
Memory decrease — reducing memory limits only works if current usage is below the new limit. Otherwise, you risk OOMKill.
-
Init containers — resize doesn't apply to init containers (they've already run).
-
Resource quotas — resizes must stay within namespace ResourceQuota limits.
-
Pod overhead — resize doesn't change pod overhead (used by sandbox containers in kata/gVisor).
Monitoring Resizes
Track resize events with Prometheus:
# Count of resize operations
kube_pod_container_status_last_resize_status
# Pods with pending resizes
kube_pod_container_resource_resize_status{status="Deferred"}Or simply watch for resize events:
kubectl get events --field-selector reason=Resized -wQuick Reference
| Scenario | Resize Result |
|---|---|
| Increase CPU | Instant, no restart |
| Decrease CPU | Instant, no restart |
| Increase memory | Instant if node has capacity |
| Decrease memory | Succeeds if usage < new limit |
| Exceed node capacity | Deferred (retries) or Infeasible |
| Exceed ResourceQuota | Rejected |
Wrapping Up
In-Place Pod Resize is one of the most impactful Kubernetes features in years. No more restarting pods just to change resource allocations. No more cold starts for JVM apps. No more VPA-induced evictions.
Combined with VPA's new InPlaceOrRecreate mode, you get truly seamless vertical autoscaling — the cluster adjusts resources on the fly based on actual workload needs.
If you're on Kubernetes 1.35+, start using it today. Your Java developers will thank you.
Want to master Kubernetes resource management, autoscaling, and production-grade cluster operations with hands-on labs? The KodeKloud Kubernetes course covers VPA, HPA, resource quotas, and real-world scaling strategies. Need a cluster to try in-place resize? DigitalOcean Kubernetes runs the latest Kubernetes versions with one-click upgrades.
Stay ahead of the curve
Get the latest DevOps, Kubernetes, AWS, and AI/ML guides delivered straight to your inbox. No spam — just practical engineering content.
Related Articles
Edge Computing Will Decentralize Kubernetes by 2028
Why Kubernetes is moving from centralized cloud clusters to distributed edge deployments. Covers KubeEdge, k3s, Akri, and the architectural shift toward edge-native infrastructure.
How to Set Up Backstage Internal Developer Portal from Scratch in 2026
Backstage is the open-source Internal Developer Portal (IDP) from Spotify, now used by Netflix, LinkedIn, and thousands of engineering teams. This step-by-step guide shows you how to deploy it, add your services, and integrate it with GitHub and Kubernetes.
How to Set Up Crossplane for Self-Service Infrastructure on Kubernetes
A step-by-step tutorial on setting up Crossplane to provision and manage cloud infrastructure directly from Kubernetes. Build a self-service platform where developers can request AWS, GCP, or Azure resources through kubectl.