Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud DevOps Engineer practice bank has 1,455 more like it. Try 10 free: instant score, no account.
Your organization runs dynamically scaled container workloads on Google Kubernetes Engine (GKE) and is implementing FinOps practices to eliminate waste and optimize resource packing density. You deploy custom ComputeClass resources to manage auto-created node pools for variable workloads.
During off-peak periods, you observe that several nodes with low CPU and memory utilization remain running for prolonged periods before being reclaimed, resulting in unnecessary infrastructure compute spend. You need to fine-tune the node consolidation behavior to more aggressively consolidate workloads onto fewer nodes and reduce the duration underutilized nodes persist before removal.
Which configuration in the ComputeClass definition should you implement?
scaleDownFactor parameter to 1.0 in the Pod specification.Cluster-level Node Auto-Provisioning (NAP) limits establish upper and lower boundaries on total cluster CPU and memory capacity. scaleDownFactor is a parameter specific to Apache Hadoop/Spark YARN autoscaling policies in Google Cloud Dataproc, not a valid field in standard Kubernetes Pod specifications or GKE ComputeClasses.
ComputeClass CRDs do not support a scaleDownFactor field. scaleDownFactor is utilized by Dataproc autoscaling algorithms to determine worker VM decommissioning rates.--max-cpu, --max-memory) define aggregate resource boundaries to prevent cluster sprawl. They do not dictate underutilization thresholds or the delay before idle nodes are drained and consolidated.requests, limits, nodeSelector), not node-level consolidation heuristics.You were configuring a Dataproc Hadoop cluster autoscaling policy to aggressively remove secondary worker nodes when YARN available capacity is detected.
consolidationThreshold percentage within the ComputeClass and set whenUnsatisfiable: ScaleUpAnyway to prevent idle node reclamation.This option lowers the consolidationThreshold and sets whenUnsatisfiable: ScaleUpAnyway in the ComputeClass manifest. The whenUnsatisfiable field dictates whether GKE should fall back to default machine configurations when preferred priority rules cannot be satisfied during scale-up events.
consolidationThreshold makes GKE less aggressive about node consolidation, requiring a node's resource utilization to drop to an even lower percentage before GKE considers it for removal.whenUnsatisfiable parameter controls scale-up provisioning behavior when priority rules (such as specific machine families or Spot instances) cannot be matched. It has no bearing on scaling down or consolidating existing underutilized nodes.consolidationThreshold acts as an upper ceiling for underutilization; lower values mean fewer nodes qualify for consolidation.ScaleUpAnyway forces GKE to provision default compute types if priority targets fail, which does not address idle node teardown delays.You wanted to make node pools highly resilient against pod scheduling delays by falling back to standard compute instances during scale-up while keeping existing nodes running even at very low utilization to avoid Pod evictions.
autoscalingPolicy section in the ComputeClass manifest, specifying a higher consolidationThreshold percentage for CPU and memory, and setting a lower value for consolidationDelayMinutes.A custom ComputeClass in Google Kubernetes Engine allows platform administrators and DevOps engineers to declaratively specify compute requirements, priorities, and autoscaling policies for auto-created node pools. The autoscalingPolicy block within a ComputeClass custom resource provides granular control over node consolidation, overriding default cluster autoscaler profile behaviors.
consolidationThreshold parameter defines the resource utilization limit (as a percentage of allocatable node capacity) below which GKE flags a node as underutilized. Increasing this threshold percentage means nodes running at moderate-to-low utilization levels become eligible for consolidation sooner, allowing GKE to aggressively pack active Pods onto fewer nodes.consolidationDelayMinutes parameter dictates the time window GKE waits before evicting workloads, draining the node, and deleting the underlying Compute Engine instance. Reducing this value accelerates the removal of underutilized infrastructure during demand drops, directly minimizing compute spend.consolidationThreshold) and accelerator workloads (gpuConsolidationThreshold).Using native ComputeClass autoscaling parameters directly targets the node removal evaluation criteria. Rather than relying on global cluster autoscaler profiles that apply cluster-wide, configuring autoscalingPolicy at the ComputeClass level allows teams to tailor consolidation aggressiveness specifically for fluctuating workload profiles.
cluster-autoscaler.kubernetes.io/safe-to-evict annotation to false in the Pod templates and configure consolidationDelayMinutes to zero.The cluster-autoscaler.kubernetes.io/safe-to-evict: "false" annotation explicitly informs the Kubernetes Cluster Autoscaler and GKE that the annotated Pods must not be evicted during normal scale-down or node auto-upgrade operations.
safe-to-evict: "false" prevents GKE from draining nodes containing these Pods. As long as an unevictable Pod runs on a node, GKE cannot drain or terminate that node, completely blocking workload consolidation and exacerbating idle node waste.safe-to-evict: "false" is intended for critical, long-running batch jobs or extended duration workloads that cannot tolerate interruption.You had non-restartable stateful or machine-learning training workloads that required protection from node draining, auto-upgrades, or scale-down evictions for extended durations.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated