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.
A financial services organization runs a mission-critical web application on a Google Kubernetes Engine (GKE) cluster. During periodic traffic spikes, several application Pods experience termination due to out-of-memory (OOM) events, while during normal hours, computing resources are underutilized. You are tasked with analyzing workload metrics to optimize cost efficiency and right-size resource requests and limits while ensuring maximum stability and responsiveness during autoscaling events.
Which combination of resource sizing and autoscaling configurations should you implement according to Google Cloud best practices?
This approach relies on over-subscribing memory allocations, setting arbitrary hard limits on CPU capacity, and replacing elastic metrics-based autoscaling with predefined, scheduled node pool adjustments.
The workload experienced strictly scheduled, highly predictable batch operations with static memory profiles and had no real-time end-user serving traffic.
This configuration sets static CPU limits equal to CPU requests while creating a large gap between memory requests and memory limits, and runs Vertical Pod Autoscaler (VPA) in auto-update mode concurrently with Horizontal Pod Autoscaler (HPA) on identical CPU metrics.
kubelet will evict and kill Pods.Auto or Recreate mode alongside an HPA targeting the same metric (CPU) causes conflicting control loops. HPA will attempt to add replicas while VPA attempts to resize existing Pods, creating race conditions and unexpected Pod evictions.The workload required strict multi-tenant CPU hard limits and had non-bursting, completely static memory requirements that were not subject to traffic-driven autoscaling.
This solution implements Google Cloud Well-Architected and GKE cost-optimization best practices for container resource management and elasticity. It balances guaranteed stability for incompressible resources (memory) with flexible elasticity for compressible resources (CPU), guided by metric-driven autoscaling tools.
cgroups out-of-memory killer to terminate Pods. Setting requests.memory equal to limits.memory guarantees dedicated memory scheduling on nodes, preventing overcommitment and node destabilization.(1 - buff)/(1 + perc)) ensures new replicas are created ahead of traffic surges, mitigating scaling latency.This strategy resolves both instability and excessive cost. Unbounded CPU limits allow applications to burst without paying for permanently reserved high-tier machine types, while matching memory requests and limits eliminates unpredictable OOM kill events.
This approach omits all resource requests and limits in the Kubernetes Deployment manifest, configures the Horizontal Pod Autoscaler (HPA) to only scale out when CPU utilization reaches 100%, and deploys Node Auto-Provisioning (NAP) without global quota or resource bounds.
requests.cpu and requests.memory), the Kubernetes scheduler cannot determine optimal node placement, which leads to unbalanced node allocation, noisy neighbors, and extreme resource starvation.BestEffort), making them the first candidates for eviction.The cluster was dedicated exclusively to ephemeral, non-critical background jobs where node failure, eviction, and severe queuing delay had zero business impact.
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