Question

Difficulty: EasyManaging Google Kubernetes Engine Resources

An application deployed on a Google Kubernetes Engine (GKE) cluster experiences fluctuating user traffic throughout the day. You need to ensure that the number of Pod replicas automatically increases or decreases based on CPU utilization metrics. Which Kubernetes object should you configure?

  1. Horizontal Pod Autoscaler (HPA)Answer
  2. B
    Cluster Autoscaler
  3. C
    GKE Autopilot Mode
  4. D
    Spot VM Node Pool auto-provisioning

Answer

Configure a Horizontal Pod Autoscaler (HPA) to scale the number of Pod replicas based on CPU utilization.
The Horizontal Pod Autoscaler (HPA) is the standard Kubernetes resource designed to scale the number of Pod replicas in a deployment, replica set, or stateful set based on resource metrics like CPU utilization.

Step-by-Step Solution

1
Identify the scaling requirement.
The goal is to scale workload Pod replicas automatically in response to CPU metrics.
Application workload demand varies at the Pod level, requiring dynamic replica management.
2
Select the appropriate GKE/Kubernetes component.
Horizontal Pod Autoscaler (HPA) target deployment and CPU metric thresholds are configured.
HPA monitors resource usage of Pods and adjusts the replica count within specified minimum and maximum bounds.

Key Concept

Managing Workload Scaling with Horizontal Pod Autoscaler vs Node-level Cluster Autoscaler in GKE
Estimated Time:45s
Rate this question