Google Cloud Professional Cloud Developer — Question 345
You are a developer at a large corporation. You manage three GKE clusters. Your team’s developers need to switch from one cluster to another regularly on the same workstation. You want to configure individual access to these multiple clusters securely while following Google-recommended practices. What should you do?
Answer options
- A. Ask the developers to use Cloud Shell and run the gcloud container clusters get-credentials command to switch to another cluster.
- B. Ask the developers to open three terminals on their workstation and use the kubectl config set command to configure access to each cluster.
- C. Ask the developers to install the gcloud CLI on their workstation and run the gcloud container clusters get-credentials command to switch to another cluster.
- D. In a text file, define the clusters, users, and contexts. Email the file to the developers and ask them to use the kubectl config set command to add cluster, user, and context details to the file.
Correct answer: C
Explanation
The correct answer is C because installing the gcloud CLI allows developers to use the gcloud container clusters get-credentials command, which securely configures access to the specified cluster. Option A is less effective as Cloud Shell may not be the preferred environment for ongoing development work. Option B requires multiple terminal setups, which is cumbersome and not as secure. Option D involves manual configuration that can lead to errors and does not follow best practices for secure access management.