Google ACE Setting Up a Cloud Solution Environment Practice Question
You want to enable the Kubernetes Engine API for your project using the command line. Which gcloud command should you use?
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
✓
gcloud services enable container.googleapis.com
'gcloud services enable container.googleapis.com' enables the required API. 'gcloud auth login' authenticates. 'gcloud config set' sets project. 'gcloud container clusters create' creates a cluster but doesn't enable the API.
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 services enable container.googleapis.com
Why this is correct
The correct command to enable the Kubernetes Engine API is `gcloud services enable container.googleapis.com`. This calls the Service Usage API to activate the service in the current Google Cloud project, making it possible to later create and manage GKE clusters. Enabling the API is a prerequisite that also links the service to the project's billing account; until this is done, any GKE resource creation will fail with an error indicating the API is disabled.
- ✗
gcloud container clusters create my-cluster
Why it's wrong here
`gcloud container clusters create my-cluster` is a cluster lifecycle operation that provisions GKE cluster resources, not a command to enable an API. If the Kubernetes Engine API is not already enabled, this command will fail immediately with a PERMISSION_DENIED or API-disabled error, so it cannot serve as the enabling step. Cluster creation also requires prior authentication, a valid project context, and sufficient IAM permissions, all of which are separate from enabling the API.
- ✗
gcloud config set project my-project
Why it's wrong here
`gcloud config set project my-project` only sets the default project ID in your gcloud configuration, and does not interact with any service APIs. This command determines which project future gcloud commands target, but it does not activate the container.googleapis.com service or any other API. To enable an API, you must use an explicit service-management command, such as `gcloud services enable`, which is entirely different from configuration management.
- ✗
gcloud auth login
Why it's wrong here
`gcloud auth login` performs user authentication by opening a browser flow to obtain OAuth credentials, but it does not change the state of any Google Cloud service. This command grants your local gcloud SDK access to call APIs on your behalf, yet the target API itself must still be explicitly enabled in the project. Authentication and API enablement are independent prerequisites: you need both, but `auth login` alone will not enable the Kubernetes Engine API.
Go deeper
Related to this question
Learn chapter
Google Compute Engine
Key term
Anthos
Anthos is a Google Cloud platform that lets you run applications consistently across different computing environments, like on-premises data centers and multiple public clouds.
Key term
Container
A container is a lightweight, standalone software package that includes everything needed to run an application, such as code, runtime, system tools, and libraries.
About these practice questions
This ACE question is part of Courseiva's 769-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 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.