Skip to content

Improve the prometheus history provider docs #9228

@ialidzhikov

Description

@ialidzhikov

Which component are you using?:
/area vertical-pod-autoscaler

Is your feature request designed to solve a problem? If so describe the problem this feature should solve.:

No

Describe the solution you'd like.:
The only existing documentation for running vpa-recommender with a prometheus history provider is How can I use Prometheus as a history provider for the VPA recommender.
When the team evaluated this option they discovered several things that could be documented better or things which were not documented at all.

Findings:

  • vpa-recommender falls back to NOT using history (and it does not write VPACheckpoints) for the metrics if it cannot reach to the prometheus instance.
  • vpa-recommender uses the pod labels from kube-state-metrics to load metrics for old (no-longer-existing) pods. An internal map in vpa-recommender maps {pod's labels, container name, namespace} to {memory/cpu histograms}. This requires that the vpa-recommender be started with the arguments: --metric-for-pod-labels=kube_pod_labels{job=\"kube-state-metrics\"}[8d] and pod-label-prefix=label_ where label_ is the prefix that kube-state-metrics adds to pod labels when it writes them to prometheus.

Credits to @plkokanov and @vitanovs for the findings.

Describe any alternative solutions you've considered.:
N/A

Additional context.:
N/A

Metadata

Metadata

Labels

area/vertical-pod-autoscalerIssues or PRs related to the Vertical Pod Autoscaler componentarea/vertical-pod-autoscaler/prometheusIssues and PRs related to Vertical Pod Autoscaler history from Prometheushelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/documentationCategorizes issue or PR as related to documentation.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions