Vertical Pod-Autoscaler does not recreate

10/30/2019

I want that Kubernetes recreate my pod with higher resources after a cpu stresstest but it does not recreate the pods, the recomandation has changed Can I somewhere control how often my VerticalPodAutoscaler checks the CPU/RAM Metrics? And is Recreate or Auto the better mode for this scenario?

apiVersion: autoscaling.k8s.io/v1beta2
kind: VerticalPodAutoscaler
metadata:
  name: my-vpa
spec:
  targetRef:
    apiVersion: "extensions/v1beta1"
    kind:       Deployment
    name:       my-auto-deployment
  updatePolicy:
    updateMode: "Recreate"

Update:

enter image description here

so the main problem is that the recommendations changed but it does not recreate the pod.

enter image description here

The pod resources did not change/recreate

-- Java
kubernetes

1 Answer

10/30/2019

By default, VPA checks the metrics values at every 10s intervals. VPA requires the pods to be restarted to change allocated resources.

-- Subramanian Manickam
Source: StackOverflow