GCP Associate Cloud Engineer Practice Question 25: GKE Cluster Autoscaler Pending
Google Cloud Associate Cloud Engineer · Test 3 · question 5 of 10
On a GKE Standard cluster with a fixed size node pool, a Deployment is scaled up and several new pods stay in the Pending state. The output of kubectl describe pod shows "Insufficient cpu" and no node can schedule them.
What should you do to resolve this now and prevent it from recurring?
Show answer and explanation
Answer:
Pods are Pending because no node has enough unreserved CPU. The cluster autoscaler adds nodes to a node pool when pods cannot be scheduled because of insufficient resources, and removes underused nodes later, within the minimum and maximum you set.
Option A increases the number of pods, which would create even more Pending pods when there is no spare capacity. Option B changes pod resource requests automatically, which can lower them below what the application needs and does not add capacity. Option D has no effect, since the scheduler would reach the same conclusion.
Reference: About GKE cluster autoscaling