You operate an AKS cluster with a user node pool that runs a Deployment for an API. An HPA is already configured to scale the Deployment from 2 to 20 replicas based on CPU. During peak events, the HPA raises desired replicas, but several new pods remain Pending with the message 'Insufficient cpu'. You want the cluster to automatically add capacity so the pods can be scheduled without manual intervention. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Enable the AKS cluster autoscaler on the user node pool and set appropriate minimum and maximum node counts..
Why this is the answer
The problem describes a situation where pods are stuck in a 'Pending' state due to 'Insufficient cpu', even after the Horizontal Pod Autoscaler (HPA) has scaled up the deployment. This indicates that the existing nodes in the user node pool do not have enough CPU resources to accommodate the new pods. The AKS cluster autoscaler automatically adjusts the number of nodes in a node pool based on resource demand. By enabling it and configuring appropriate minimum and maximum node counts, the cluster will provision new nodes when pods are unschedulable due to resource constraints, resolving the 'Insufficient cpu' issue. Increasing the HPA maxReplicas value would allow more pods to be desired, but it wouldn't solve the underlying resource shortage on the nodes. Changing the HPA to use memory metrics wouldn't address the CPU insufficiency. A Vertical Pod Autoscaler (VPA) adjusts resource requests and limits for individual pods, which could help optimize resource usage but wouldn't dynamically add new nodes to the cluster when overall capacity is lacking.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed