Courseiva

Google ACE Deploying and Implementing a Cloud Solution Practice Question

An engineer is configuring a GKE cluster and wants to enable Horizontal Pod Autoscaling (HPA) for a deployment named 'web-frontend'. The deployment currently has 3 replicas. The engineer wants to automatically scale the number of pods based on CPU utilization, targeting 50% average CPU utilization. Which command should the engineer run?

⚠ Common exam trap

The trap is confusing cluster autoscaling (node-level, gcloud) with Horizontal Pod Autoscaling (pod-level, kubectl), and mixing up the --cpu-percent flag with invalid alternatives like --cpu or --max-cpu.

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

✓

kubectl autoscale deployment web-frontend --cpu-percent=50 --min=3 --max=10

The correct command is 'kubectl autoscale deployment web-frontend --cpu-percent=50 --min=3 --max=10', which creates an HPA targeting 50% average CPU utilization with a minimum of 3 and maximum of 10 replicas. The 'kubectl autoscale' subcommand is the standard imperative way to create an HPA for a deployment. The flags --cpu-percent, --min, and --max are the correct parameters for this command.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    gcloud container clusters autoscale web-frontend --target-cpu-utilization=0.5 --min-nodes=3 --max-nodes=10

    Why it's wrong here

    This gcloud command configures cluster node autoscaling, adjusting the number of nodes in a node pool rather than the replica count of the web-frontend deployment. It is tempting because it also targets 50% CPU, but node autoscaling responds to unschedulable pods, not per-deployment pod scaling.

  • ✗

    kubectl autoscale deployment web-frontend --max-cpu=50 --min=3 --max=10

    Why it's wrong here

    kubectl autoscale has no --max-cpu flag; CPU targeting is expressed with --cpu-percent. It is tempting because the deployment, minimum and maximum values are all correct, and the intent to scale on CPU is right, but the flag name does not exist.

  • ✓

    kubectl autoscale deployment web-frontend --cpu-percent=50 --min=3 --max=10

    Why this is correct

    kubectl autoscale creates a HorizontalPodAutoscaler targeting the deployment, with --cpu-percent=50 setting the target utilisation and --min=3 --max=10 bounding replica count. This satisfies the requirement to scale web-frontend automatically on CPU, starting from its current 3 replicas.

  • ✗

    kubectl autoscale deployment web-frontend --cpu=50 --min=3 --max=10

    Why it's wrong here

    The --cpu flag is not a valid kubectl autoscale parameter; the command requires --cpu-percent to set the target utilisation. It is tempting because autoscale genuinely creates an HPA on a deployment, and --min/--max are correct, but the CPU target flag name is wrong.

About these practice questions

Courseiva writes every ACE question from scratch — 775 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Google Cloud exam blueprint

This ACE practice question is part of Courseiva's free Google Cloud 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 ACE exam.