
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 correct answer is C. To enable autoscaling for an existing Kubernetes Engine cluster, you should use the gcloud command to update the cluster and enable autoscaling while specifying the minimum and maximum number of nodes. The command is: 'gcloud alpha container clusters update mycluster --enable-autoscaling --min-nodes=1 --max-nodes=10'. This ensures that your cluster can scale up or down based on demand. Options A and B are incorrect because they do not configure autoscaling. Option D, although technically correct in approach, is not optimal because it involves creating a new cluster when you can simply update the existing one.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have a running Google Kubernetes Engine (GKE) cluster that handles varying demands for your application. To make sure the cluster can automatically adjust its size based on the load, 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.