Optimizing CPU Requests for Stateful GKE Pods

PCA Last updated

Short answer

A Configure per-Deployment CPU requests slightly above observed typical usage while keeping limits, giving stateful Dealer Tools Pods a Burstable profile with burst headroom.

Question

Company Overview KnightMotives is a car manufacturer specializing in autonomous, self-driving vehicles, including Battery Electric Vehicles (BEVs), hybrids and traditional internal combustion engine (ICE) vehicles. While KnightMotives has made strides with the in-vehicle experience in their BEV fleet, the hybrid and ICE vehicles have yet to implement these new systems and are viewed poorly by critics and drivers. The lack of modern in-vehicle technology in hybrid and ICE vehicles has resulted in declining sales and customer satisfaction. KnightMotives wants to modernize the consumer experience across all vehicles within five years Artificial Intelligence offers a unique opportunity to revolutionize the in-vehicle experience, as well as the shopping buying and service/maintenance experience. Investment in this new technology will require a shift in financial priorities on a global scale. KnightMotives also wants to improve their online ordering system, which is unreliable. Systems for customers to build their vehicle online for acquisition through a dealer are not delivering the data or reliability that dealers need, causing. A strain in the relationship between KnightMotives and dealers. Service technicians and sales staff need better tooling to enhance dealer successes, including built-to-order vehicles. Solution Concept KnightMotives wants to shift from manufacturing cars to creating a complete and compelling “automotive experience.” Then strategy prioritizes delivering a consistent experience across all models, developing AI-powered features, generating new revenue from data monetization, adopting a digital focus to differentiate their brand from competitors, and developing better tools for mechanics and salespeople. Existing Technical Environment KnightMotives's IT is largely on-premises with some applications on major cloud platforms. Their supply chain runs on an outdated mainframe, and Enterprise Resource Planning (ERP) is also outdated, making new promotions and dealer discounts difficult to implement. Dealers have no budget for new equipment. There is fragmentation across vehicles with multiple code bases, and significant technical debt from supporting backwards compatibility. Network connectivity to manufacturing plants and vehicle connectivity in rural areas are challenges. Business Requirements Key business requirements include fostering a personalized relationship with the driver and delivering a cohesive experience across all models. Creating a better build-to-order model will reduce time on the lot and provide transparency for both dealers and customers. Additionally, KnightMotives seeks to monetize corporate data to finance new technology investments, as their current AI infrastructure is obsolete and corporate data remains siloed. Security is a paramount concern due to past data breaches Adherence to European Union (EU) data protection regulations, especially for emerging autonomous platforms, is critical. KnightMotives plans to make significant investments in fully autonomous driving capabilities, with initial implementation targeting regions with favorable regulatory environments. Prioritizing employee upskilling, attracting top-tier talent, and fostering better communication between business and technical teams are also critical objectives. Technical Requirements • Modernizing the in-vehicle experience includes developing a consistent user experience (UX) that seamlessly integrates AI-powered features across all models, updating in-vehicle hardware and software in legacy models to support new UX features and AI capabilities, and ensuring reliable network connectivity, especially in rural areas, to support real-time AI features and data transmission. • Network upgrades are necessary to support increased data traffic and improve connectivity between plants and headquarters. • IT infrastructure modernization requires adopting a hybrid cloud strategy to leverage the benefits of both on-premises and cloud infrastructure, and gradually modernizing or replacing legacy systems to improve efficiency and agility. • Autonomous vehicle development and testing requires investing in cutting-edge AI and machine learning technologies, building a robust simulation environment, and ensuring compliance with evolving regulations related to autonomous vehicles. • Data monetization and insights requires implementing a robust data management platform, strict data security and privacy measures, and a scalable AI/ML infrastructure. • Increased focus on security and risk management involves implementing a comprehensive security framework to protect against cyber threats and data breaches, developing an incident response plan, and providing security awareness training to employees. • Providing a delightful experience for dealers and customers requires improving the online build-to-order system; developing modern dealer tools to streamline dealer operations, including sales, service, and inventory management; and implementing a comprehensive Customer Relationship Management (CRM) system to track customer interactions personalize experiences, and improve customer satisfaction. Executive Statement KnightMotives is committed to enhancing safety and saving lives by leveraging an extensive body of data — encompassing driving, road conditions, behavioral studies, and crash safety statistics — to create compelling digital experiences for drivers. Our AI consistently outperforms national safety statistics, ensuring the unique and coveted KnightMotives experience is aligned across all our vehicle models. Michael Knight, KnightMotives CEO For this question, refer to the KnightMotives Automotive case study, KnightMotives has deployed their new Dealer Tools on Google Kubernetes Engine (GKE). You are supporting KnightMotives in the performance of the GKE workloads. Some of the Pods are Statefull. To ensure these Pods do not consume an unlimited amount of CPU, you have configured resource limits on the Deployments. You have identified that these Pods were allocated too much CPU and are actually consuming drastically less some of the time. You want to optimize resource usage and allow maximum flexibility in case of higher load. What should you do?

  1. Configure resource requests per Deployment. Set resource requests slightly above the typical CPU usage observed during monitoring. Correct Answer
  2. Configure resource requests per Deployment. Ensure the requests are equal to the current limits.
  3. Enable vertical Pod autoscaling on each Deployment. Ensure the autoscaling mode is set to Auto.
  4. Enable horizontal Pod autoscaling on each Deployment. Ensure the minimum number of Pods is lower than the currently configured amount in the Deployment.

Key Takeaways

The question tests the difference between requests (guaranteed floor) and limits (burst ceiling) for stateful workloads, and the common trap is picking VPA Auto mode, which evicts and restarts Pods to apply new recommendations.

For KnightMotives' stateful Dealer Tools Pods on GKE, over-provisioned CPU allocations are fixed by setting resource requests per Deployment slightly above observed typical usage while retaining the existing limits. This creates a Burstable QoS class that packs nodes efficiently yet still permits bursting to the limit during load spikes.

Common mistake: Option C is the most-chosen wrong answer: Vertical Pod Autoscaler in Auto mode applies recommendations by evicting and restarting Pods, which disrupts stateful Dealer Tools Pods, and it adapts to sustained trends rather than handling sudden load spikes.

Expert Analysis

Why the Answer Is Correct

Option A sets CPU requests per Deployment slightly above the typical CPU usage seen in monitoring while leaving the already-configured limits in place. The scheduler uses requests to reserve capacity, so lowering requests from an inflated value to just above real usage stops wasting guaranteed CPU and lets the cluster pack Pods more densely. Because limits stay high, each Pod can still burst well above its request when dealer traffic surges, which is exactly the "maximum flexibility in case of higher load" the question asks for. This yields the Burstable QoS class, which is the intended profile for variable, non-guaranteed workloads such as these Dealer Tools deployments.

Why the Other Options Are Wrong

Option B makes requests equal to limits, producing a Guaranteed QoS Pod that reserves its full allocation at all times — precisely the over-provisioning the team is trying to eliminate, and it removes any headroom economics. Option C enables VPA in Auto mode, but VPA applies new recommendations by evicting and restarting Pods; for Statefull Pods this causes restarts, brief downtime, and possible loss of in-memory state, and VPA reacts to sustained trends rather than instantaneous spikes. Option D scales horizontally with a lower minimum Pod count, which does not fix the per-Pod CPU over-allocation described, risks under-capacity during peak dealer activity, and does not address the actual request-versus-usage mismatch.

Community Comment Notes

Several voters favored C, with one noting that VPA "Optimizes resources by adjusting requests/limits based on actual usage" and "Works well with stateful workloads." A dissenting comment pointed out that VPA in Auto mode "evicts and restarts Pods to apply new resource recommendations" and that for stateful Pods "frequent restarting can cause severe disruptions and downtime." That critique matches Google's own guidance on VPA limitations, so the request-tuning approach in A remains the safer, more directly responsive answer.

Official Reference

Exam Strategy

On GKE/GKE Autopilot questions involving stateful Pods, treat any answer that evicts or restarts Pods with suspicion, and look for the request-versus-limit distinction first. Remember that requests drive scheduling and guaranteed allocation while limits cap bursts, so tuning requests down to observed usage is the standard optimization move.

Frequently Asked Questions

Why is VPA in Auto mode a bad choice for these stateful Pods?

VPA Auto mode applies new recommendations by evicting and restarting Pods, which can disrupt stateful Dealer Tools workloads and cause downtime. It also reacts to sustained usage trends rather than sudden load spikes.

Why does setting requests equal to limits not solve the over-provisioning?

Requests equal to limits creates a Guaranteed Pod that reserves its full allocation permanently, keeping the over-allocation problem intact and reducing how many Pods fit on each node.

More PCA FAQ →

Discussion 4 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded.

From public community threads 4

  1. toasty 👍 3 Answered C
    VPA in Auto mode is the ideal solution because it: Optimizes resources by adjusting requests/limits based on actual usage Provides maximum flexibility by automatically adapting to load changes Works well with stateful workloads Solves the exact problem described (overprovisioned Pods with variable usage)
  2. cachopo 👍 1 Answered A
    A is the correct answer because setting CPU requests slightly above typical usage—while keeping your existing CPU limits higher—creates a burstable resource profile in Kubernetes. The request tells the Kubernetes scheduler the minimum amount of CPU to guarantee for the Pod, allowing the cluster to efficiently pack more Pods onto your nodes to optimize overall resource usage during normal operations. Because the limit remains configured higher than the request, the Pod retains the maximum flexibility to seamlessly consume extra CPU beyond its guaranteed request if it experiences a sudden spike in load.
  3. cachopo 👍 1
    Vertical Pod Autoscaler (VPA) in Auto mode evicts and restarts Pods to apply new resource recommendations. For Stateful Pods, frequent restarting can cause severe disruptions and downtime. Furthermore, VPA is designed to adjust to sustained usage trends over time, whereas configuring a gap between requests and limits handles sudden load spikes instantaneously without requiring a restart.
  4. ttttttttt 👍 1 Answered C
    Vertical Pod Autoscaling (VPA) monitors actual CPU and memory usage and automatically adjusts Pod resource requests to better match workload needs. In Auto mode, VPA can apply those recommendations, allowing resources to scale according to observed demand.

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Practice All PCA Questions

Access 81 questions with complete answers and detailed explanations.

View Full PCA Practice Test →

← Back to PCA Study Guide