AZ-204 Develop Azure compute solutions Practice Question
Your team develops a containerized web app using Azure Kubernetes Service (AKS). You need to ensure that the application can automatically scale based on HTTP request load. Which Kubernetes resource should you configure?
⚠ Common exam trap
Many exam-takers confuse HorizontalPodAutoscaler with VerticalPodAutoscaler, mistakenly thinking that adjusting pod resources (CPU/memory) is the correct way to handle HTTP load, when in fact HPA scales the number of pod replicas horizontally to distribute the load.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
HorizontalPodAutoscaler
The HorizontalPodAutoscaler (HPA) is the correct Kubernetes resource for automatically scaling the number of pod replicas based on observed CPU, memory, or custom metrics like HTTP request rate. In an AKS cluster, HPA adjusts the replica count of a Deployment or ReplicaSet to match the target metric, enabling the application to handle varying HTTP load without manual intervention.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
VerticalPodAutoscaler
Why it's wrong here
The VerticalPodAutoscaler (VPA) in Kubernetes automatically adjusts the CPU and memory requests and limits for individual pods. Its primary function is to optimize resource allocation for existing pods, preventing resource waste or performance bottlenecks by adapting to historical usage patterns. However, VPA does not scale the *number* of pods in response to increased application load; it only modifies the resource profile of running pods.
- ✗
PodDisruptionBudget
Why it's wrong here
A PodDisruptionBudget (PDB) is a Kubernetes API object that ensures a minimum number or percentage of application pods remain available during voluntary disruptions. These disruptions include planned maintenance, node upgrades, or other actions that might evict pods. While critical for maintaining service availability and resilience, a PDB does not dynamically scale the application's pod count based on real-time load metrics or user demand.
- ✓
HorizontalPodAutoscaler
Why this is correct
The HorizontalPodAutoscaler (HPA) automatically scales the number of pods in a deployment, replicaset, or statefulset based on observed resource utilization, such as CPU or memory, or custom metrics. It dynamically increases or decreases the replica count to match the current application load, ensuring optimal performance and efficient resource consumption. This mechanism is fundamental for handling fluctuating traffic and maintaining responsiveness in a containerized web app.
- ✗
NetworkPolicy
Why it's wrong here
A NetworkPolicy in Kubernetes defines rules that specify how groups of pods are allowed to communicate with each other and with external network endpoints. It acts as a firewall, enforcing network segmentation and enhancing security by controlling ingress and egress traffic for pods. However, NetworkPolicies are purely concerned with network access control and do not possess any functionality to automatically scale the number of running pods based on application performance or load metrics.
Go deeper
Related to this question
About these practice questions
This AZ-204 question is part of Courseiva's 881-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.