Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Associate Cloud Engineer practice bank has an additional 2,014 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your team deploys a stateless web application to Google Kubernetes Engine (GKE) as a Deployment named web-frontend.
You create a Horizontal Pod Autoscaler (HPA) configured to maintain an average target CPU utilization of 70%, with a minimum of 2 replicas and a maximum of 10 replicas. During load testing, traffic spikes significantly, but the HPA fails to scale out the Pod replicas and reports that it cannot calculate utilization.
What configuration change must you make to the Deployment manifest to enable the Horizontal Pod Autoscaler to work properly?
The Vertical Pod Autoscaler (VPA) automatically adjusts the CPU and memory resource requests and limits of container instances within existing Pods, rather than changing the total number of Pod replicas.
The application were a stateful, single-replica service that could not scale horizontally across multiple instances and needed automatic resizing of its container CPU and memory allocations over time.
resources.limits.cpu) while omitting resource requests.Resource limits (resources.limits.cpu) specify the maximum ceiling of compute capacity that a container can consume on a node. If a container attempts to exceed its defined CPU limit, the Linux kernel throttles its execution rather than terminating it.
The objective was to prevent a rogue container or runaway thread from consuming all CPU cores on a node and starving neighboring Pods.
resources.requests.cpu) for each container in the Pod template.In Kubernetes and Google Kubernetes Engine (GKE), resource requests (resources.requests) define the baseline amount of compute resources (such as CPU cores or memory) that a container is guaranteed to receive. The Kubernetes scheduler uses these values to decide which node has enough capacity to host the Pod.
When a Horizontal Pod Autoscaler (HPA) is configured with a target utilization percentage (such as 70% CPU), it calculates current utilization as a ratio of the actual CPU usage divided by the Pod's requested CPU.
Current Utilization % = (Actual CPU Usage / Requested CPU) * 100resources.requests.cpu provides the baseline metric necessary for the HPA to accurately scale the workload between the minimum of 2 and maximum of 10 replicas.Setting resources.requests.cpu in the Deployment template directly resolves the mathematical dependency required by the HPA controller loop. It ensures that traffic spikes trigger automatic horizontal scale-out without manual intervention.
The Cluster Autoscaler manages the physical or virtual infrastructure layer by automatically adjusting the number of worker nodes in a GKE node pool based on pending, unschedulable Pods.
Pending state that cannot be scheduled due to insufficient compute resources.The HPA were already successfully generating new Pod replicas during traffic spikes, but those new Pods remained stuck in a Pending state because the existing worker nodes had run out of schedulable CPU or memory capacity.
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