kubernetes / autoscaler

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

Question on VPA - Benefits of Using 'prometheus' for VPA Recommender --storage Option #7168

Closed dongheeJeong closed 8 hours ago

dongheeJeong commented 2 months ago

Hello everyone,

I’m currently exploring the Vertical Pod Autoscaler (VPA) and considering the --storage option for the recommender component, which can be set to either checkpoint (default) or prometheus.

I understand that configuring prometheus might require additional setup and integration steps. Could someone please clarify the benefits of using prometheus over the default checkpoint method?

Specifically, I’m interested in understanding:

If there are any documents or resources that cover this comparison, please point me to them.

Thank you so much for your time and assistance!

adrianmoisey commented 2 months ago

/area vertical-pod-autoscaler

adrianmoisey commented 1 month ago

Honestly, I'm not too sure. The feature was added in https://github.com/kubernetes/autoscaler/pull/535 with no description

My understanding is that it allows for more flexibility with getting history of Pod metrics.

adrianmoisey commented 1 month ago

Oh another option is that metrics-api may not be installed on a cluster, and someone would prefer to use Prometheus.

dwilliams782 commented 1 week ago

Isn't the point that on recommender start up, by default it will look for VerticalPodAutoscalerCheckpoint object per VPA, whereas with Prometheus it can query a configurable amount of historical data?

AFAICT, the main difference is when you are deploying recommender for the first time using VerticalPodAutoscalerCheckpoint resources will be inaccurate until it has collected a good amount of data (over the course of days / weeks I would guess)?

adrianmoisey commented 1 week ago

Yup, that's definitely an advantage of Prometheus over metric-server. Thanks for mentioning it.

adrianmoisey commented 8 hours ago

I've recently had a look at this code and it seems like the only advantage is to that the history is loaded into the VPA for Prometheus. After that, the VPA gets metrics per Pod from the metrics-server.

adrianmoisey commented 8 hours ago

I hope that answers your question, please re-open if not.

/remove-kind bug /kind support /close

k8s-ci-robot commented 8 hours ago

@adrianmoisey: Those labels are not set on the issue: kind/bug

In response to [this](https://github.com/kubernetes/autoscaler/issues/7168#issuecomment-2468647531): >I hope that answers your question, please re-open if not. > >/remove-kind bug >/kind support >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
k8s-ci-robot commented 8 hours ago

@adrianmoisey: Closing this issue.

In response to [this](https://github.com/kubernetes/autoscaler/issues/7168#issuecomment-2468647531): >I hope that answers your question, please re-open if not. > >/remove-kind bug >/kind support >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
adrianmoisey commented 8 hours ago

/remove-kind feature