A cloud engineer manages a stateless application deployed as a Kubernetes Deployment on a Google Kubernetes Engine (GKE) cluster. During peak business hours, CPU usage increases significantly. The engineer needs to automatically scale the number of running application Pods up or down based on CPU utilization metrics. Which Kubernetes resource should the engineer configure?
- HorizontalPodAutoscalerAnswer
- BCluster Autoscaler
- CGKE Autopilot node allocation policy
- DSpot Node Pool with auto-provisioning
Answer
The HorizontalPodAutoscaler (HPA) resource should be configured to scale the number of Pod replicas based on CPU utilization.
The HorizontalPodAutoscaler (HPA) automatically adjusts the number of Pod replicas in a Deployment based on targeted metrics such as CPU utilization.
Step-by-Step Solution
Key Concept
Horizontal Pod Autoscaler vs. Cluster Autoscaler in GKE