Soru

Zorluk: ZorManaging Google Kubernetes Engine Resources

A DevOps engineer is managing a Google Kubernetes Engine (GKE) Standard cluster named `analytics-cluster` located in region `us-central1`. The cluster contains a node pool named `worker-pool` that experiences variable compute demands throughout the day. The engineer needs to configure GKE to automatically adjust the number of worker VM instances in `worker-pool` based on unschedulable pending pods, while strictly maintaining a minimum of 3 nodes and a maximum of 12 nodes per zone. Which command should the engineer run to accomplish this goal?

  1. gcloud container node-pools update worker-pool --cluster=analytics-cluster --region=us-central1 --enable-autoscaling --min-nodes=3 --max-nodes=12Cevap
  2. B
    kubectl autoscale deployment worker-pool --min=3 --max=12 --cpu-percent=80
  3. C
    gcloud container clusters update analytics-cluster --region=us-central1 --node-pool=worker-pool --num-nodes=12
  4. D
    gcloud compute instance-groups managed update worker-pool --region=us-central1 --size=12

Cevap

Execute `gcloud container node-pools update worker-pool --cluster=analytics-cluster --region=us-central1 --enable-autoscaling --min-nodes=3 --max-nodes=12`.
The command `gcloud container node-pools update worker-pool --cluster=analytics-cluster --region=us-central1 --enable-autoscaling --min-nodes=3 --max-nodes=12` correctly enables and configures the GKE Cluster Autoscaler for the specified node pool with the requested lower and upper node limits.

Adım Adım Çözüm

1
Identify the scaling requirement level
Recognize that scaling the underlying GKE compute nodes based on pending pods requires Cluster Autoscaler at the node pool level, not Horizontal Pod Autoscaler at the workload level.
Node infrastructure management is handled by GKE Cluster Autoscaler.
2
Select the correct gcloud command tool and subcommand
Use `gcloud container node-pools update` targeting the target node pool (`worker-pool`) within the cluster (`analytics-cluster`).
Node pool properties in GKE are modified using `gcloud container node-pools update`.
3
Specify autoscaling configuration flags
Append `--enable-autoscaling`, `--min-nodes=3`, and `--max-nodes=12` along with the appropriate `--region` flag.
These flags configure the minimum and maximum boundary bounds per zone for GKE Cluster Autoscaler.

Anahtar Kavram

GKE Cluster Autoscaler Node Pool Management
Tahmini Süre:2m 0s
Bu soruyu puanla