Pods on your GKE node pool stay Pending with 'insufficient cpu' events during a traffic spike. You want new nodes added automatically whenever the scheduler cannot place pods. Which component should you enable?
Show answer and explanation
Answer: B
The cluster autoscaler watches for pods that cannot be scheduled because nodes lack capacity. It then increases the size of a node pool, within configured minimum and maximum limits. When nodes sit underused, it scales them back down. The Horizontal Pod Autoscaler adds pods rather than nodes, so on a full cluster it would not fix pending pods by itself.
Why the other options are wrong
- A. The HPA adds replicas based on metrics, but on a full cluster the new replicas also stay Pending. It does not provision machines, so the underlying shortage persists.
- C. The VPA recommends or adjusts resource requests for individual pods. It does not add nodes, and recommendation mode changes nothing about pods that are already pending.
- D. A disruption budget limits how many pods can be voluntarily evicted at once during maintenance. It does not create capacity for pending pods.