Question

Difficulty: Very hardManaging Google Kubernetes Engine Resources

A cloud engineer manages a high-throughput processing pipeline deployed on a Google Kubernetes Engine (GKE) Standard cluster. The workload manifests define Pods with heavy CPU resource requests (2000m2000\text{m} per Pod). During peak loads, the Horizontal Pod Autoscaler (HPA) scales the deployment replica count up, causing multiple newly created Pods to remain in the `Pending` state with the event reason `FailedScheduling`. Inspection reveals that the existing node pool has reached its maximum configured size under Cluster Autoscaler, and no existing nodes have sufficient unallocated CPU to schedule the pending Pods. The engineer wants GKE to automatically provision entirely new node pools with appropriate machine types and scale limits when existing node pools cannot accommodate Pod resource requests. Which command should the engineer execute to meet this operational requirement?

  1. A
    kubectl autoscale deployment pipeline-processor --cpu-percent=50 --min=5 --max=100
  2. B
    gcloud container clusters update production-cluster --enable-autopilot --region=us-central1
  3. gcloud container clusters update production-cluster --enable-autoprovisioning --max-cpu=128 --max-memory=512 --region=us-central1Answer
  4. D
    gcloud container node-pools create spot-pool --cluster=production-cluster --enable-spot --num-nodes=50 --region=us-central1

Answer

Execute `gcloud container clusters update production-cluster --enable-autoprovisioning --max-cpu=128 --max-memory=512 --region=us-central1` to enable GKE Node Auto-provisioning.
The correct command updates the GKE cluster configuration to enable Node Auto-provisioning (NAP). NAP is an advanced feature of GKE Cluster Autoscaler that automatically provisions new node pools with matching CPU, memory, and machine specifications when unschedulable Pods cannot fit onto existing node pools or when existing node pools reach maximum scale limits.

Step-by-Step Solution

1
Analyze the operational failure.
Pods are in a `Pending` state because nodes lack available CPU allocation, and existing node pools have reached their Cluster Autoscaler max-nodes boundary.
Standard Cluster Autoscaler only scales existing node pools up to their defined `--max-nodes` limit and cannot create new node pools with different machine sizes unless configured to do so.
2
Evaluate GKE resource auto-management capabilities.
Node Auto-provisioning (NAP) extends Cluster Autoscaler by dynamically creating, sizing, and deleting node pools based on unschedulable Pod resource requests and limits.
NAP requires cluster-level enablement with maximum resource limits specified (`--max-cpu` and `--max-memory`).
3
Identify the correct command parameters.
The `gcloud container clusters update` command with `--enable-autoprovisioning` and global cluster capacity constraints enables dynamic node pool provisioning.
This allows GKE to spin up new node pools automatically when unschedulable Pods demand hardware configurations outside existing node pool parameters.

Key Concept

GKE Node Auto-provisioning (NAP)
Rate this question