Prepare and test your skills

Prepare and test your skills

Evaluate Cost and Operational Implications of Resource Requests means understanding how Pod CPU, memory, and accelerator requests set both cost and efficiency in Autopilot. Google Kubernetes Engine (GKE) (opens in a new tab) Autopilot automatically provisions nodes to match the total requests, and billing is based on those requested amounts rather than actual container use. Accurate requests therefore keep workloads schedulable without paying for idle capacity.
Autopilot billing is reservation-based, so each Pod pays for what it requests. When a Pod requests CPU, memory, or GPUs (opens in a new tab), GKE provisions matching capacity and charges for that reservation even if the container uses less. Over-requesting increases cost without improving performance, while under-requesting can leave Pods short of CPU or memory and cause slowdowns or restarts.
Specialized hardware follows the same request-based model with extra rules. GKE Autopilot places exactly one GPU Pod on each GPU node, along with GKE-managed system workloads and any DaemonSets that tolerate all taints. Additional pricing rules for accelerators include:
Resource requests drive automatic capacity decisions through node auto-provisioning and the cluster autoscaler (opens in a new tab). Autopilot creates and removes nodes without manual node pools, and it makes those decisions from Pod requests rather than real-time utilization. Explicit, accurate requests are therefore required for correct scheduling and scaling.
The scaling flow moves from pending Pods to node changes. First, unschedulable Pods that do not fit on current nodes trigger the autoscaler to add nodes in parallel until those Pods can become active. Then, when nodes are underutilized and all Pods could fit on fewer nodes, the autoscaler removes nodes to save cost. If requests are missing or too low, the autoscaler does not fix the shortage, so Pods can stay pending or unstable while still holding reserved capacity.
Exam tip: Autopilot scales and bills on what Pods request, not what containers actually use — accurate requests control both cost and scheduling.
Cost-effective requests align reservations with real demand and remove capacity when it is not needed. Right-sizing CPU and memory prevents waste from over-provisioning, while workload autoscaling adds Pod copies during traffic spikes and removes them when traffic returns to normal. For expensive GPUs, the same approach provisions accelerators only while jobs run and releases them when jobs finish.
Monitoring makes right-sizing possible by showing the gap between requests and use. Effective review of cluster performance helps optimize operating costs, using the GKE dashboard in Monitoring to visualize cluster status and the Observability dashboard in the Google Cloud console to view observability metrics. By combining accurate requests, multi-replica controllers that tolerate disruption, and regular dashboard review, teams improve reliability, avoid out-of-memory errors, and pay only for reserved compute.
Configure Pod Resource Requests for Optimal Performance means declaring the CPU, memory, and ephemeral storage each container needs to run reliably. Resource requests in Autopilot (opens in a new tab) tell the scheduler how much capacity to reserve on a node, and Autopilot provisions nodes from the sum of those requests. Autopilot also corrects values that are missing or outside allowed ranges at workload creation.
Pod resource requests in GKE Autopilot (opens in a new tab) control both placement and charges. The scheduler places a Pod only on a node that can accommodate its requests, and billing charges for the sum of Pod requests even if actual usage is lower. Under-provisioning therefore risks throttling and eviction, while over-provisioning increases cost and reduces how efficiently Pods pack onto nodes. The Vertical Pod Autoscaler (VPA) (opens in a new tab) helps by analyzing historical and real-time usage and recommending request values for Deployments and other controller-managed workloads.
Automatic resource management in Autopilot modifies workload configuration at creation to meet minimums, maximums, and ratios. Autopilot first applies default requests to containers with no request, then checks minimums and the CPU-to-memory ratio. The corrections work as follows:
A decision tree showing how GKE Autopilot evaluates Pod resource requests at creation: it applies defaults for missing requests, raises requests below minimums such as 50m CPU, fixes CPU-to-memory ratios, handles ephemeral storage range violations, and either modifies and accepts the workload or rejects it.
Behavior for excess ephemeral storage depends on version. Before version 1.28.6-gke.1317000 Autopilot scaled down excess storage, while in that version and later Autopilot rejects the workload. By default, extra capacity added to meet a minimum or default goes to the first container in the Pod manifest. In GKE version 1.27.2-gke.2200 and later, the autopilot.gke.io/primary-container: "CONTAINER_NAME" annotation directs that extra capacity to a specific container.
Request-to-limit settings in Autopilot control whether a Pod stays fixed at its reservation or can burst into unused node capacity. A request reserves baseline CPU or memory, while a limit sets a higher ceiling the Pod may reach when spare capacity exists. When limits equal requests, the Pod receives Guaranteed Quality of Service (QoS) and cannot burst. When limits are higher than requests or unset on bursting-capable clusters, the Pod receives Burstable QoS and can spike opportunistically.
The following table compares common settings and Autopilot behavior for CPU, memory, and ephemeral storage:
| Values set | Autopilot behavior |
|---|---|
| Requests equal to limits | Pods use Guaranteed QoS; ephemeral storage limits must equal requests and GKE enforces this rule |
| Requests set, limits not set | On bursting clusters Pods can burst into burstable capacity; on non-bursting clusters GKE sets limits equal to requests |
| Requests less than limits | On bursting clusters Pods can burst up to limits; on non-bursting clusters GKE sets limits equal to requests |
| Requests not set, limits not set | Autopilot sets requests to defaults; bursting clusters leave limits unset while non-bursting clusters set limits equal to requests |
Burstable behavior differs for CPU and memory under pressure. If burstable Pods exceed available capacity, GKE throttles CPU so every container still gets its requested CPU, but GKE terminates containers to reclaim memory starting with lower-QoS, resource-intensive containers. For this reason, teams should request enough memory for normal operation and boot and should not rely on memory bursting to start a Pod.
Exam tip: Ephemeral storage limits must always be set equal to requests in Autopilot, while CPU and memory limits may be set higher than requests to allow bursting.
Right-sizing requests in Autopilot balances steady-state needs, peak spikes, and cost. Set memory request equal to memory limit so GKE can enforce usage and avoid abrupt termination during memory pressure. Set CPU request to the minimum needed to meet service objectives and leave CPU limit unbounded or higher than request when short bursts during startup or traffic spikes are expected. In most steady situations, adequate requests with equal limits provide stability, with higher limits reserved for workloads that briefly need more than steady-state.
Under-provisioning causes CPU throttling at high utilization, higher risk of node exhaustion, and memory termination when usage exceeds requests under pressure. Over-provisioning wastes paid capacity because Autopilot charges for requested resources and lowers bin-packing efficiency on nodes. To protect critical work, give critical Pods equal requests and limits for Guaranteed QoS, allow memory bursting only on Pods that tolerate eviction, and separate consistently bursty Pods from critical Pods with workload separation.
Understand Autopilot Resource Management Behavior means explaining how Autopilot matches compute capacity to Pod requirements without manual node management. GKE Autopilot (opens in a new tab) provisions and scales nodes through node auto-provisioning, tunes resource requests, and manages specialized node pools for hardware such as GPUs. Pod CPU and memory requests drive what Autopilot provisions, those requests drive what is billed, and scheduling rules decide where Pods can run.
GKE Autopilot automatically provisions compute so operators do not create node pools or add and remove nodes by hand. When a Pod needs capacity that does not exist, Autopilot creates new nodes to accommodate it, and when demand falls the capacity scales back down. Each new node takes approximately 80 to 120 seconds to boot, and GKE waits until the node has started before placing pending Pods on it. Because provisioning happens after demand appears, teams can reserve spare capacity with low-priority placeholder Pods that hold nodes until higher-priority production Pods evict them.
Autopilot combines workload scaling and infrastructure scaling to balance cost, reliability, and operations:
The Horizontal Pod Autoscaler (HPA) (opens in a new tab) provides workload scaling by monitoring Pod utilization and adding more Pods when existing Pods are busy. Autopilot then provides the infrastructure scaling that places those new Pods on suitable nodes.
CPU and memory requests in Autopilot are the sizing signal that tells GKE how much power a Pod needs. Autopilot uses those requests to select and provision node capacity, to right-size the workload to its actual requirements, and to decide scheduling. By default, Autopilot Pods use compute resources optimized for general-purpose workloads, and a different compute class can be specified when a workload needs to scale optimally or has other unique requirements.
Requests also drive cost because billing is based on the resource requests of running Pods. This includes running low-priority placeholder Pods and GPU Pod resource requests (opens in a new tab), so over-requesting CPU, memory, or accelerators increases charges even if containers use less. Accurate requests therefore improve both reliability and cost efficiency: enough CPU and memory helps prevent crashes and slow responses during peak demand, while avoiding excess requests prevents paying for idle capacity.
Request-to-limit behavior in GKE controls whether a Pod can temporarily use more than it requested through Pod bursting. A request reserves a baseline amount of CPU or memory, while a limit sets a higher ceiling that the Pod may reach when unused capacity is available on the node. Bursting lets a Pod temporarily use resources that were requested by other Pods on the same node, if that capacity is available and unused by those Pods.
To allow bursting, request-to-limit configuration must leave headroom above the reservation. Setting resource limits higher than resource requests or not setting resource limits allows bursting on capable clusters, while setting limits equal to requests keeps the Pod constrained to its reserved size. Bursting remains opportunistic rather than guaranteed because it still depends on other Pods leaving capacity unused during the spike.
Scheduling constraints in Autopilot decide which Pods can share a node and which Pods replace others during scale-up. Autopilot places exactly one GPU Pod on each GPU node, along with GKE-managed workloads that run on all nodes and any DaemonSets configured to tolerate all node taints. A DaemonSet for logging or monitoring can run on every node, including GPU nodes, only when it includes a toleration that lets it ignore node taints, and it can target specific accelerator types with a node selector such as cloud.google.com/gke-accelerator.
Priority-based preemption creates another scheduling constraint for spare capacity. A low-priority placeholder Pod uses a low-priority PriorityClass with value -10 and preemption policy Never, while production Pods use a higher global-default PriorityClass with preemption policy PreemptLowerPriority. When production replicas scale up, traffic flows from the scheduler to production Pods as GKE evicts the lowest-priority placeholder Pods first and schedules production Pods in their place. An evicted placeholder returns to the Pending state until capacity is available again, which keeps spare nodes warm without blocking real work.
Exam tip: In Autopilot you are charged for the resource requests of running Pods, while in Standard you are charged for the underlying Compute Engine VMs whether Pods use that capacity or not.
Billing in Google Kubernetes Engine Autopilot is reservation-based, so each Pod pays for what it requests for CPU, memory or accelerators even if the container uses less. Autopilot provisions matching capacity from the sum of those requests, so over-requesting increases cost without improving performance while under-requesting can cause slowdowns or restarts.
Autopilot applies the default requests for the compute class or hardware configuration to any container without a request and raises any request below the allowed minimum to at least the minimum, such as raising a Pod total below 0.05 vCPU to 50 mCPU. It also scales up the smaller resource to bring the CPU-to-memory ratio within the allowed range with a minimum ratio of 1 vCPU to 1 GiB of memory, and raises ephemeral storage to meet the per-container minimum with extra capacity going to the first container by default.
CPU and memory limits may be set higher than requests or left unset to allow bursting into unused node capacity on bursting-capable clusters, while setting limits equal to requests gives Guaranteed Quality of Service and keeps the Pod constrained to its reservation. Ephemeral storage limits must always equal requests in Autopilot, and burstable CPU is throttled to guarantee requested CPU under pressure while memory is reclaimed by terminating containers starting with lower Quality of Service resource-intensive containers.
An administrator is deploying an in-memory data processing workload to a Google Kubernetes Engine (GKE) Autopilot cluster. During performance testing, the Pod encounters frequent Out-Of-Memory (OOMKilled) termination errors because memory allocation is insufficient for the working set, while CPU utilization remains near zero despite having several vCPUs requested.
The administrator wants to ensure workload stability while optimizing operational costs in GKE Autopilot.
What should the administrator do?
Increase the Pod's memory request to fit the required working set and reduce the CPU request to match actual utilization
Omit CPU and memory requests from the Pod manifest so Autopilot dynamically allocates unlimited memory at runtime
Increase the CPU request to maximum while leaving memory requests unchanged so the OS can swap memory pages
Over-provision both CPU and memory requests to the maximum allowable values because Autopilot only bills for actual process consumption
Last updated