VPA recommender-updater-webhook workflow¶
The VPA recommender-updater-webhook workflow is the operational process used by the Vertical Pod Autoscaler (VPA) to monitor resource utilization and adjust Pod resource requests dynamically.^[400-devops-06-kubernetes-k8s-ithelp-day27-readme.md]
Core Components¶
The workflow is primarily composed of three components that interact to automate the scaling process^[400-devops-06-kubernetes-k8s-ithelp-day27-readme.md]:
- Recommender: Monitors historical resource utilization Metrics and calculates recommended values for
requestsandlimits^[400-devops-06-kubernetes-k8s-ithelp-day27-readme.md]. - Updater: Evicts Pods that require updates to their resource configurations, as changes to
requestsandlimitstypically require a service restart to take effect^[400-devops-06-kubernetes-k8s-ithelp-day27-readme.md]. - Admission Controller: Intercepts Pod creation requests via a Webhook to apply the new
requestsandlimitscalculated by the Recommender^[400-devops-06-kubernetes-k8s-ithelp-day27-readme.md].
Workflow Sequence¶
When VPA is configured with updateMode: Auto, the workflow proceeds as follows^[400-devops-06-kubernetes-k8s-ithelp-day27-readme.md]:
- Recommendation: The Recommender analyzes Metrics history and generates resource recommendations.
- Eviction: The Updater identifies Pods whose current resources differ from the recommendation and evicts them^[400-devops-06-kubernetes-k8s-ithelp-day27-readme.md].
- Reconciliation: The underlying Deployment controller attempts to recreate the evicted Pod.
- Mutation: Before the new Pod is scheduled, the Admission Controller Webhook is triggered, injecting the updated
requestsandlimitsinto the Pod specification^[400-devops-06-kubernetes-k8s-ithelp-day27-readme.md].
Interaction with Update Modes¶
The behavior of this workflow is governed by the updateMode setting in the VPA resource^[400-devops-06-kubernetes-k8s-ithelp-day27-readme.md]:
- Off: The Recommender generates recommendations, but the Updater and Admission Controller take no action.
- Auto: The full workflow is active; the Updater evicts Pods to apply the Recommender's suggestions^[400-devops-06-kubernetes-k8s-ithelp-day27-readme.md].
- Initial: The Admission Controller applies recommendations only when a Pod is first created (typically during a restart or deployment), but the Updater does not actively evict running Pods for updates.
Sources¶
400-devops-06-kubernetes-k8s-ithelp-day27-readme.md