What happened?
I deployed Vertical Pod Autoscaler with updateMode: InPlaceOrRecreate, but the pods are never updated in place. Instead, the VPA updater logs show:
I1004 13:14:39.847429 1 pods_inplace_restriction.go:97] "Can't in-place update pod, but not falling back to eviction. Waiting for next loop" pod="default/app-569758fbc5-jzzjc"
- In-place scaling does work manually (kubectl patch with CPU change updates the pod without restart).
- VPA recommends higher CPU values, but it never applies them in-place.
- No eviction happens either — the pod just stays unchanged.
What did you expect to happen?
With updateMode: InPlaceOrRecreate and resizePolicy.restartPolicy: NotRequired, I expect VPA to patch the running Pod’s CPU requests in-place when the recommendation is above the current request.
How to reproduce it
- Enable feature gates on API server + kubelet:
--feature-gates=InPlacePodVerticalScaling=true
- Run VPA with feature gate:
FEATURE_GATES="InPlaceOrRecreate=true" ./hack/vpa-up.sh
- Create deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
name: app
spec:
replicas: 1
selector:
matchLabels:
app: app
template:
metadata:
labels:
app: app
spec:
containers:
- name: nginx
image: nginx
resources:
limits:
cpu: 200m
requests:
cpu: 100m
resizePolicy:
- resourceName: cpu
restartPolicy: NotRequired
- Create VPA:
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: nginx-vpa
spec:
targetRef:
apiVersion: "apps/v1"
kind: Deployment
name: app
updatePolicy:
updateMode: "InPlaceOrRecreate"
resourcePolicy:
containerPolicies:
- containerName: "nginx"
minAllowed:
cpu: "200m"
maxAllowed:
cpu: "700m"
controlledResources: ["cpu"]
- Apply CPU load in pod (e.g. with stress-ng) until recommendation > current requests.
- Check VPA updater logs → see error above.
Environment
- Kubernetes version: 1.33.5
- VPA version: 1.5.0
- Feature gates: InPlacePodVerticalScaling=true (API server, scheduler, controller-manager, kubelet)
- Pod resizePolicy: restartPolicy: NotRequired
- Verified that manual kubectl patch can update pod CPU in-place
Additional info
- VPA gives recommendations (visible in status), so recommender is working.
- Updater log confirms it attempted in-place update but refused with:
Can't in-place update pod, but not falling back to eviction. Waiting for next loop
- No events are created on the pod.
- It seems the restriction logic in pods_inplace_restriction.go prevents updates even when they are possible.
What happened?
I deployed Vertical Pod Autoscaler with
updateMode: InPlaceOrRecreate, but the pods are never updated in place. Instead, the VPA updater logs show:I1004 13:14:39.847429 1 pods_inplace_restriction.go:97] "Can't in-place update pod, but not falling back to eviction. Waiting for next loop" pod="default/app-569758fbc5-jzzjc"What did you expect to happen?
With
updateMode: InPlaceOrRecreateandresizePolicy.restartPolicy: NotRequired, I expect VPA to patch the running Pod’s CPU requests in-place when the recommendation is above the current request.How to reproduce it
--feature-gates=InPlacePodVerticalScaling=trueFEATURE_GATES="InPlaceOrRecreate=true" ./hack/vpa-up.shEnvironment
Additional info
Can't in-place update pod, but not falling back to eviction. Waiting for next loop