Vertical Pod Autoscaler
The Vertical Pod Autoscaler (VPA) automatically adjusts the CPU and memory resources of pods. It continuously analyzes the actual consumption of workloads, then recommends or applies adjustments.
| Component | Role |
|---|---|
recommender | Analyzes metrics and recommends resources for pods |
updater | Recreates pods when the recommendations change |
admissionController | Applies the recommended resources when pods are created |
In the console
The Vertical Pod Autoscaler is part of the Advanced Configuration of the Addons step: it is always present in the cluster and cannot be disabled. You can only override its configuration.
- At creation (Addons step) or from Edit > Extensions & Addons, expand the Vertical Pod Autoscaler block in the Advanced Configuration section.
- Enter your values in Helm Configuration (YAML) — optional.
- Confirm with Next then Create cluster (creation) or Save (modification).
Clearing the field, or a line of the override, from Edit does not remove a value already applied to the cluster. Contact support to return to the default values.
On the cluster detail page, the VPA line of the Network section shows VPA when the addon is configured.
Override the configuration
The YAML value is passed to the VPA Helm chart, under the vertical-pod-autoscaler key. For example, to disable the updater and only use the recommendations:
vertical-pod-autoscaler:
updater:
enabled: false
The available options are described in the Vertical Pod Autoscaler Helm chart.
Usage in the cluster
Create a VerticalPodAutoscaler object for each workload to track:
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: my-app
spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: my-app
updatePolicy:
updateMode: "Off"
kubectl apply -f vpa-my-app.yaml
# Read the recommendations
kubectl describe vpa my-app
Best practices
- Start with
updateMode: "Off"to observe the recommendations before applying them. - Do not use the VPA and a
HorizontalPodAutoscaleron the same metric (CPU or memory) of the same workload. - Combine the VPA with node group autoscaling to adapt both the pods and the cluster capacity.