Question

Difficulty: MediumDeploying and Managing Google Kubernetes Engine (GKE) Clusters and Workloads

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?

  1. Configure a Horizontal Pod Autoscaler (HPA) resource targeting the application Deployment.Answer
  2. B
    Enable Cluster Autoscaler on the node pool to provision additional nodes when CPU utilization increases.
  3. C
    Migrate the workload to a Spot node pool to automatically increase the CPU allocation of existing pods during high traffic.
  4. D
    Migrate the cluster to GKE Autopilot so that GKE can dynamically change the resource limits of running pod containers in-place.

Answer

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.

Step-by-Step Solution

1
Identify the scaling requirement based on workload demand.
Recognize that the bottleneck is insufficient pod replicas despite existing node capacity.
The cluster nodes have free compute capacity, so adding worker nodes will not resolve unscaled workload replicas.
2
Select the appropriate GKE autoscaling mechanism for pod workload scaling.
Determine that Horizontal Pod Autoscaler (HPA) targets Kubernetes Deployments to scale pod instances dynamically based on metrics like CPU utilization.
HPA scales the number of running pod replicas horizontally when targeted utilization thresholds are met.

Key Concept

GKE Workload Autoscaling with Horizontal Pod Autoscaler (HPA)
Rate this question