Google Associate Cloud Engineer

Google Associate Cloud Engineer

Get started today

Ultimate access to all questions.


You have deployed your application to a default node pool on a GKE cluster and wish to configure cluster autoscaling to ensure profitability by limiting the number of Kubernetes nodes to 10. Your goal is to start small, scaling up with increased traffic and scaling down when traffic decreases. What is the best approach?




Explanation:

The correct approach is to update the existing GKE cluster to enable autoscaling with gcloud container clusters update [CLUSTER_NAME] --enable-autoscaling --min-nodes=1 --max-nodes=10. This command adjusts the cluster's node count automatically within the specified limits, aligning with the requirement to scale based on traffic. Other options either involve unnecessary cluster recreation, incorrect tagging methods, or manual scaling which doesn't meet the automatic scaling requirement.