A Cloud Engineer is managing a stateless web application running on a Google Kubernetes Engine (GKE) Standard cluster. To maintain performance during peak usage, the application must automatically scale its pod replica count whenever average CPU usage exceeds 75%. Additionally, if pods enter a Pending state due to insufficient compute capacity in the cluster, the underlying GKE node pool must automatically provision additional Compute Engine instances. Which TWO actions should the engineer perform to fulfill these operational requirements? (Select TWO.)
- Execute kubectl autoscale deployment web-app --cpu-percent=75 --min=2 --max=10 to create a Horizontal Pod Autoscaler for the application workload.Cevap
- Execute gcloud container node-pools update pool-1 --enable-autoscaling --min-nodes=2 --max-nodes=10 --cluster=prod-cluster --zone=us-central1-a to enable Cluster Autoscaler on the GKE node pool.Cevap
- CExecute gcloud container node-pools update pool-1 --enable-autoscaling --min-nodes=2 --max-nodes=10 to scale the number of pod replicas running inside the deployment.
- DMigrate the application workload to a GKE Autopilot cluster to allow manual modification of node OS kernel parameters for autoscaling.
Cevap
The correct operational actions are to configure Horizontal Pod Autoscaler (HPA) using `kubectl autoscale deployment` to scale pod replica counts based on CPU usage, and to enable Cluster Autoscaler on the node pool using `gcloud container node-pools update` to provision extra GKE nodes when pending pods cannot be scheduled.
Managing GKE resources efficiently requires configuring scaling at two distinct layers: pod-level workload scaling and node-level infrastructure scaling. Executing `kubectl autoscale deployment` creates a Horizontal Pod Autoscaler (HPA) resource that adjusts pod counts according to workload CPU utilization. Executing `gcloud container node-pools update --enable-autoscaling` configures the GKE Cluster Autoscaler to provision additional worker nodes whenever pending pods cannot be scheduled onto existing nodes.
Adım Adım Çözüm
Anahtar Kavram
Dual-Layer GKE Scaling (Horizontal Pod Autoscaler vs. Cluster Autoscaler)