An organization runs a web application deployed on a Google Kubernetes Engine (GKE) Standard cluster. During unexpected traffic surges, CPU utilization across application pods increases significantly, causing latency. The underlying node pool currently has sufficient unallocated CPU and memory capacity to host additional pods, but the application does not automatically scale up the number of pod replicas. Which solution should the DevOps team implement to dynamically scale the application pod count based on resource demand?
- Configure a Horizontal Pod Autoscaler (HPA) resource targeting the application Deployment.Cevap
- BEnable Cluster Autoscaler on the node pool to provision additional nodes when CPU utilization increases.
- CMigrate the workload to a Spot node pool to automatically increase the CPU allocation of existing pods during high traffic.
- DMigrate the cluster to GKE Autopilot so that GKE can dynamically change the resource limits of running pod containers in-place.
Cevap
Configure a Horizontal Pod Autoscaler (HPA) resource targeting the application Deployment.
Configuring a Horizontal Pod Autoscaler (HPA) allows GKE to automatically scale the number of pod replicas in the Deployment up or down according to measured CPU utilization. Because the node pool already has available capacity, increasing pod replicas directly addresses the workload bottleneck without requiring node scaling.
Adım Adım Çözüm
Anahtar Kavram
GKE Workload Autoscaling with Horizontal Pod Autoscaler (HPA)