A cloud engineer needs to enable the Google Kubernetes Engine API (`container.googleapis.com`) for a target project named `app-cluster-prod` using the `gcloud` CLI tool. Which of the following requirements and commands are necessary to successfully enable this API? (Select TWO.)
- Execute the command `gcloud services enable container.googleapis.com --project=app-cluster-prod`.Answer
- Grant the executing service account or identity the Service Usage Admin role (`roles/serviceusage.serviceUsageAdmin`) on the project.Answer
- CExecute the command `gcloud components enable container.googleapis.com` to activate the API across all organization projects.
- DGrant the executing identity the Service Usage Consumer role (`roles/serviceusage.serviceUsageConsumer`) on the target project.
Answer
To enable the Google Kubernetes Engine API for a target project, you must execute `gcloud services enable container.googleapis.com --project=app-cluster-prod` using an identity that holds the Service Usage Admin role (`roles/serviceusage.serviceUsageAdmin`) on the target project.
Enabling a Google Cloud API requires using the `gcloud services enable` command for the target project and holding an IAM role with `serviceusage.services.enable` permissions, such as Service Usage Admin.
Step-by-Step Solution
Key Concept
Enabling GCP Service APIs using gcloud services enable and Service Usage IAM Roles
Estimated Time:1m 30s