Definition:

How does VPA work?

  • Components:
    • The recommender: analyzes resource usage and provides recommendations
    • the updater: update that pod resource requests either by evicting Pods or modifying them in place
    • the VPA admission controller webhook: applies resource recommendations to new or recreated pods
  • Once during each period, the Recommender queries the resource utilization for Pods targeted by each VerticalPodAutoscaler definition
  • The Recommender analyzes both current and historical resource usage data (CPU and memory). It examines:
    • Historical consumption patterns and trends
    • Peak usage and variance to ensure sufficient headroom
    • Out-of-memory (OOM) events and other resource-related incidents
  • Updater monitors VPA resources and compare current Pod resources with the recommendations. Then updater can either:
    • evict pods, which triggers their recreation with new resource request
    • update pods resources in place without eviction, when the cluster supports in-place pod resource updates
  • The updater respects PodDisruptionBudgets to minimize service impact.
  • The admission controller operates as a mutating webhook that intercepts Pod creation requests. It checks if the Pod is targeted by a VerticalPodAutoscaler and, if so, applies the recommended resource requests and limits before the Pod is created.

Update modes

  • Off
  • Initial
  • Recreate
  • InPlaceOrRecreate

s

  • several different recommendation types, each with values for CPU and memory:
    • Lower Bound: this is the lower bound number VPA looks at for triggering a resize. If your pod utilization goes below this, VPA will delete the pod and scale it down.
    • Target: this is the value VPA will use when resizing the pod.
    • Uncapped Target: if no minimum or maximum capacity is assigned to the VPA, this will be the target utilization for VPA.
    • Upper Bound: this is the upper bound number VPA looks at for triggering a resize. If your pod utilization goes above this, VPA will delete the pod and scale it up.