Several Pods in a GKE Standard cluster stay in the Pending state because no existing node has enough free CPU to schedule them. Which mechanism is responsible for adding capacity, and on what basis does it act?
- AThe cluster autoscaler, because it adds nodes to a node pool when Pods cannot be scheduled for want of resources, and later removes nodes that stay underutilised. Correct
- BThe Horizontal Pod Autoscaler, because it watches aggregate node CPU and provisions extra nodes into the pool once utilisation crosses its configured target.
- CThe Vertical Pod Autoscaler, because it recreates the Pending Pods with smaller resource requests until they fit onto the nodes that already exist.
- DThe kube-scheduler, because when it finds no fit it directly requests a new Compute Engine VM and binds the Pending Pods to it as soon as the VM registers.
Why A is correct: The cluster autoscaler resizes node pools based on scheduling pressure, adding nodes when Pods are unschedulable due to insufficient resources and removing nodes that remain underutilised.
Why B is wrong: This is tempting because the HPA reacts to CPU, but it scales Pod replica counts, not nodes, so it cannot resolve Pending Pods caused by a shortage of node capacity.
Why C is wrong: The VPA does adjust resource requests, but it is meant to right-size Pods rather than force-fit them, and it does not add the node capacity the Pending Pods actually need.
Why D is wrong: The scheduler only assigns Pods to nodes that already exist and reports failures when none fit; it does not create VMs, which is the cluster autoscaler's job.