
Answer-first summary for fast verification
Answer: Update the existing Kubernetes Engine cluster with the following command: gcloud alpha container clusters update mycluster - -enable- autoscaling - -min-nodes=1 - -max-nodes=10
The question asks to enable autoscaling on an existing (running) GKE cluster to dynamically scale based on application demand. Option C is correct because it uses the 'update' command to enable autoscaling on the existing cluster, setting appropriate min and max node limits (1-10), which avoids downtime and redeployment. The community consensus strongly supports C (100% in answers_community, with high upvotes on comments confirming C). While the command in C uses 'alpha' (which may be outdated in current versions), it was historically correct and aligns with the principle of updating an existing cluster. Option A is incorrect as it manually resizes the cluster to a fixed size (10 nodes), not enabling autoscaling. Option B is incorrect because adding tags does not enable autoscaling; it is unrelated to GKE's autoscaling mechanism. Option D is incorrect as it creates a new cluster, which is unnecessary and disruptive for an existing running cluster.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You want to enable your running Google Kubernetes Engine cluster to automatically scale in response to changes in application demand. What should you do?
A
Add additional nodes to your Kubernetes Engine cluster using the following command: gcloud container clusters resize CLUSTER_Name ג€" -size 10
B
Add a tag to the instances in the cluster with the following command: gcloud compute instances add-tags INSTANCE - -tags enable- autoscaling max-nodes-10
C
Update the existing Kubernetes Engine cluster with the following command: gcloud alpha container clusters update mycluster - -enable- autoscaling - -min-nodes=1 - -max-nodes=10
D
Create a new Kubernetes Engine cluster with the following command: gcloud alpha container clusters create mycluster - -enable- autoscaling - -min-nodes=1 - -max-nodes=10 and redeploy your application
No comments yet.