
Answer-first summary for fast verification
Answer: Configure a HorizontalPodAutoscaler with a target CPU usage. Enable the Cluster Autoscaler from the GCP Console.
The question requires automatically scaling the number of nodes in a GKE cluster based on CPU load. Option A is correct because it combines HorizontalPodAutoscaler (HPA) and Cluster Autoscaler (CA) effectively: HPA scales pods based on CPU usage, and when there aren't enough resources for new pods, CA automatically adds nodes. This is a best practice in GKE, as confirmed by the community discussion with high consensus (100% votes for A, 65 upvotes on the top comment) and references to official GKE documentation. Options B and D are incorrect because they involve enabling autoscaling on the managed instance group, which conflicts with GKE's managed nature and is explicitly discouraged per GKE documentation. Options C and D are also incorrect because maxUnavailable and maxSurge properties relate to deployment update strategies, not autoscaling based on CPU load.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You want your Google Kubernetes Engine cluster to automatically scale the number of nodes based on CPU utilization. What should you do?
A
Configure a HorizontalPodAutoscaler with a target CPU usage. Enable the Cluster Autoscaler from the GCP Console.
B
Configure a HorizontalPodAutoscaler with a target CPU usage. Enable autoscaling on the managed instance group for the cluster using the gcloud command.
C
Create a deployment and set the maxUnavailable and maxSurge properties. Enable the Cluster Autoscaler using the gcloud command.
D
Create a deployment and set the maxUnavailable and maxSurge properties. Enable autoscaling on the cluster managed instance group from the GCP Console.
No comments yet.