kubernetes / autoscaler

Autoscaling components for Kubernetes
Apache License 2.0
8.08k stars 3.97k forks source link

VPA updater only works initially #6822

Closed balazsnyitray-seon closed 6 months ago

balazsnyitray-seon commented 6 months ago
vertical-pod-autoscaler **What version of the component are you using?**: 1.1.0 **What k8s version are you using (`kubectl version`)?**: v1.29.3-eks-adc7111 **What did you expect to happen?**: VPA updater continiously evicting pods for which a new recommendation happened. **What happened instead?**: VPA at first when it is deployed runs through all the containers for which there are vpa settings deployed, evicting the pods and applying the recomnmendation to them - as expected. Later, when the recommendations are updated, it does not evict the pods. I am using AUTO mode. I also set --min-replicas=1 And i can confirm updater is able to evict pods - it works as expected for the first recommendation. For recommendation updates it does not evict. There are no newer updater logs either. I can see these kind of logs repeating in the recommenders logs - i suspect this is normal (also, the vpa resourced did get updated! '1 cluster_feeder.go:128] An attempt to watch eviction events finished' So initially the recommendations are in sync, but it will adrift as soon as a new recommendation is created. If i force kill the pods, it will apply the correct settings... I guess it can be a faulty setup instead of a bug, or some version mismatch, still feels odd that initially it is able to evict the pods, but fails afterwards.
balazsnyitray-seon commented 6 months ago

ok, i think i found my answer, the key is pod-update-threshold and in-recommendation-bounds-eviction-lifetime-threshold. Will close this ticket, as it is working as expected.