VPA Recommender¶
The VPA Recommender is a core component of the Vertical Pod Autoscaler (VPA) responsible for monitoring resource usage and calculating optimal resource requests for containers^[400-devops__06-Kubernetes__k8s-ithelp__Day27__README.md].
Functionality¶
The Recommender continuously monitors historical metrics and resource utilization values to generate estimates^[400-devops__06-Kubernetes__k8s-ithelp__Day27__README.md]. Based on this analysis and the VPA configuration, it calculates recommended values for CPU and memory requests and limits^[400-devops__06-Kubernetes__k8s-ithelp__Day27__README.md].
It exposes these recommendations via the Status field of the VerticalPodAutoscaler custom resource, providing specific values for:
- Target: The recommended value within the allowed ranges for optimal container operation^[400-devops__06-Kubernetes__k8s-ithelp__Day27__README.md].
- Lower Bound: The threshold below which a Pod is considered unstable and may be evicted and replaced^[400-devops__06-Kubernetes__k8s-ithelp__Day27__README.md].
- Upper Bound: The threshold above which a Pod is considered unstable and may be evicted and replaced^[400-devops__06-Kubernetes__k8s-ithelp__Day27__README.md].
- Uncapped Target: The calculated recommendation without constraints applied by
minAllowedormaxAllowedpolicies^[400-devops__06-Kubernetes__k8s-ithelp__Day27__README.md].
Interaction with Updater¶
The Recommender operates alongside the Updater component^[400-devops__06-Kubernetes__k8s-ithelp__Day27__README.md]. When the VPA's updateMode is set to Auto, the Updater uses the Recommender's calculations to drive the actual resizing process^[400-devops__06-Kubernetes__k8s-ithelp__Day27__README.md].
Since changing resource requests requires a Pod to restart, the Updater evicts existing Pods so they can be recreated with the new values recommended by the Recommender^[400-devops__06-Kubernetes__k8s-ithelp__Day27__README.md]. If the mode is set to Off or Initial, the Recommender continues to provide calculations, but they may only be used for status reporting or applied only at Pod creation time^[400-devops__06-Kubernetes__k8s-ithelp__Day27__README.md].