KCNA ยท Cluster administration and scheduling
Autoscaling in Kubernetes
Horizontal Pod Autoscaler, Vertical Pod Autoscaler, Cluster Autoscaler: what each scales and on which signals.
Key points
- HorizontalPodAutoscaler (built in) changes the number of Pod replicas, using signals such as CPU utilization relative to requests, memory or custom metrics, evaluated about every 15 seconds.
- VerticalPodAutoscaler is an add-on that adjusts the CPU and memory of Pods.
- Cluster Autoscaler adds or removes nodes, typically when Pods cannot be scheduled for lack of capacity.
- HPA needs a metrics source, usually Metrics Server.
Source: https://kubernetes.io/docs/concepts/workloads/autoscaling/
Practice questions
What does the Horizontal Pod Autoscaler change?
- The number of Pod replicas
- The CPU limit of each Pod
- The number of nodes
- The size of etcd
Show answer
Answer: A. The number of Pod replicas
HPA changes the replica count of a scalable workload such as a Deployment. Changing per-Pod resources is VPA, and changing node count is Cluster Autoscaler.
Which statements about the autoscalers are correct?
- HPA is a built-in Kubernetes feature
- VPA is an add-on that is not installed by default
- Cluster Autoscaler adds or removes nodes
- HPA rewrites each Pod's CPU limit
- HPA can scale a DaemonSet
Show answer
Answer: A. HPA is a built-in Kubernetes feature, B. VPA is an add-on that is not installed by default, C. Cluster Autoscaler adds or removes nodes
HPA is built in, VPA is an add-on that must be deployed, and Cluster Autoscaler works on node count. HPA does not rewrite per-Pod limits and cannot scale a DaemonSet.
The Vertical Pod Autoscaler ships built in with every Kubernetes cluster.
Show answer
Answer: False
False. VPA is an add-on that an administrator must deploy, and it also needs a metrics source.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
