Azure AI Cloud Developer (AI-200) · Free practice question 3 of 12
Horizontal Pod Autoscaler on CPU
The tokenizer Deployment on AKS at Ambleside Labs should automatically run between 2 and 12 pods, adding pods when average CPU use exceeds 60% of the requested CPU. Which command sets this up?
- A.az aks nodepool update --enable-cluster-autoscaler --min-count 2 --max-count 12
- B.kubectl scale deployment tokenizer --replicas=12
- C.kubectl autoscale deployment tokenizer --cpu-percent=60 --min=2 --max=12
- D.kubectl set resources deployment tokenizer --limits=cpu=60%
Show answer and explanation
Correct answer: C. kubectl autoscale deployment tokenizer --cpu-percent=60 --min=2 --max=12
Why: kubectl autoscale creates a HorizontalPodAutoscaler that adjusts the Deployment's replica count between the minimum and maximum based on average CPU utilization relative to the pods' requests. kubectl scale sets a fixed count once. The cluster autoscaler changes the number of nodes, not pods. kubectl set resources edits requests or limits and doesn't take percentages.
More free Azure AI Cloud Developer (AI-200) questions
- Importing a public image into ACR
- Event-driven Container Apps job
- Container TTL for chat history
- Optimistic concurrency with ETag
- IVFFlat lists and probes tuning
- Entra ID connection to Azure Managed Redis
- Deferring Service Bus messages
- Event Grid system topic for storage events
- NCRONTAB timer trigger schedule
- User-assigned identity shared by apps
- KQL distinct counts with dcount