Google Associate Cloud Engineer Question 191
Single answerGoogle Cloud PlatformYou are an Associate Cloud Engineer tasked with managing your company's Google Kubernetes Engine (GKE) clusters. You need to view the current inventory of running GKE clusters in your project. Which command should you use?
- A
gcloud container clusters list
- B
kubectl get nodes
- C
gcloud container clusters describe [CLUSTER_NAME]
- D
gcloud compute instances list
Show answer and explanation
Correct answer: A
Explanation
To view the current inventory of running GKE clusters, you use the 'gcloud container clusters list' command. This command provides a list of all clusters in the specified project and location, making it the correct choice for viewing cluster inventory.
- A. Correct.
This command lists all the GKE clusters in the specified project or location, providing an inventory of running clusters.
- B. Incorrect.
This command is used to list all nodes within a specific Kubernetes cluster, not to list clusters themselves.
- C. Incorrect.
This command provides detailed information about a specific GKE cluster, not a list of all clusters.
- D. Incorrect.
This command lists all Compute Engine instances, which is unrelated to GKE clusters.