Soru

Zorluk: KolayManaging Google Kubernetes Engine Resources

A cloud engineer needs to ensure that a stateless application running on a Google Kubernetes Engine (GKE) cluster can handle traffic spikes. The requirement is to automatically scale up the container instances during high demand, and to automatically add compute nodes to the cluster if existing nodes run out of capacity to host those pods. Which TWO actions should the engineer perform to fulfill these requirements?

  1. Configure a Horizontal Pod Autoscaler (HPA) for the deployment to scale the pod replica count based on CPU utilization.Cevap
  2. B
    Configure Cluster Autoscaler to monitor container CPU usage and automatically adjust the deployment's pod replica count.
  3. Enable Cluster Autoscaler on the GKE cluster node pool to add worker nodes when pending pods cannot be scheduled due to insufficient resources.Cevap
  4. D
    Migrate the deployment workload to a Spot VM node pool as the primary mechanism for expanding container replica counts.

Cevap

The correct actions are configuring a Horizontal Pod Autoscaler (HPA) to scale the pod replica count based on workload demand, and enabling GKE Cluster Autoscaler on the node pool to add nodes when pending pods require additional compute capacity.
To manage scaling at both the application tier and the underlying cluster infrastructure tier in GKE, two distinct features must be configured. Horizontal Pod Autoscaler (HPA) dynamically adjusts the deployment's pod replica count based on metric thresholds like CPU usage. When the increase in pod count exceeds current cluster compute resources, Cluster Autoscaler automatically adds new worker nodes to the node pool so pending pods can be scheduled.

Adım Adım Çözüm

1
Determine the application-level scaling requirement.
Identify that scaling the number of container instances (pods) in response to CPU demand requires a Horizontal Pod Autoscaler (HPA).
HPA targets workload-level scaling by increasing or decreasing pod replicas based on resource metrics.
2
Determine the cluster-level infrastructure scaling requirement.
Identify that adding node capacity when pods cannot fit on current nodes requires GKE Cluster Autoscaler.
Cluster Autoscaler monitors unschedulable (pending) pods and automatically provisions additional GKE worker nodes.

Anahtar Kavram

Managing GKE resource scaling requires combining Horizontal Pod Autoscaler (HPA) for pod workload elasticity with Cluster Autoscaler for underlying compute node capacity.
Bu soruyu puanla