Cloud Intermediate
Vertical Pod Autoscaler¶
KubernetesVPAAutoscaling 3 min read
Automatic CPU and memory configuration for containers. Recommendations and auto-update.
Modes¶
- Off — recommendations only (safe for getting started)
- Initial — sets values during pod creation
- Auto — continuously updates (restarts pods)
Configuration¶
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: api-vpa
spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: api
updatePolicy:
updateMode: "Off" # Recommendations only
resourcePolicy:
containerPolicies:
- containerName: app
minAllowed: {cpu: 100m, memory: 128Mi}
maxAllowed: {cpu: 4, memory: 8Gi}
Summary¶
VPA complements HPA. Start in Off mode, analyze recommendations, then set correct requests.
Need Help with Implementation?¶
Our team has experience designing and implementing modern architectures. We’re happy to help.