The Kubernetes tool that analyzes historical and current resource usage to recommend or automatically adjust container CPU and memory requests/limits. VPA solves the opposite problem from HPA: instead of adding more Pods, it makes each Pod the right size. Synthesized from CKA Day 17 — Kubernetes Autoscaling Explained.
What Is VPA?
VPA is not part of the core Kubernetes distribution; it is an official addon maintained by the Kubernetes Autoscaling Special Interest Group (SIG). It consists of three components:
Component
Role
Recommender
Monitors metrics and computes recommended requests/limits
Updater
Evicts Pods that need new resource values (in “Auto” or “Initial” mode)
Admission Plugin
Mutates new Pod specs to inject recommended resources at creation time
CKA Note: VPA is conceptual knowledge for the exam. You should know what it does, its three modes, and why it conflicts with HPA. Detailed VPA installation and configuration are not exam topics. Source: CKA Day 17
VPA Modes
VPA operates in three modes that trade off safety vs automation:
Mode
What Happens
Use Case
Off
Generates recommendations only; does not modify workloads
Safe starting point; review recommendations before applying
Initial
Applies recommendations only to newly created Pods
Low risk; existing Pods keep running with old values
Auto
Evicts running Pods and recreates them with updated resources
Full automation; may cause brief downtime during eviction
Critical Warning: Do not run VPA in “Auto” mode on the same workload as HPA. Both controllers adjust capacity, which causes thrashing: HPA adds replicas, VPA reduces per-Pod resources, HPA removes replicas, VPA increases resources. Choose one primary autoscaler per workload. Source: CKA Day 17
Exam-style hands-on tasks for this topic. Complete each task before reviewing the solution. Time yourself — CKA tasks average 5–7 minutes.
Task 1: Install VPA and Create a VPA Object
You are asked to install VPA in the cluster and create a VPA object for Deployment api in Auto mode.
Requirements: The VPA must target Deployment api and set updateMode: Auto.
Verification:kubectl get vpa api -o yaml | grep updateModeSolution:
Task 2: Explain VPA Auto Mode vs HPA
You are asked to explain why VPA in Auto mode may cause Pod restarts and how it differs from HPA.
Requirements: Answer in one or two sentences each.
Verification: N/A (conceptual)
Solution:
# VPA Auto mode evicts and recreates Pods to apply new resource recommendations,# which causes brief downtime. HPA adds or removes replicas without restarting# existing Pods, so it does not cause per-Pod restarts.