Google Cloud Professional Cloud Developer — Question 255
You are a developer at a large corporation. You manage three Google Kubernetes Engine clusters on Google Cloud. Your team’s developers need to switch from one cluster to another regularly without losing access to their preferred development tools. You want to configure access to these multiple clusters while following Google-recommended best practices. What should you do?
Answer options
- A. Ask the developers to use Cloud Shell and run gcloud container clusters get-credential to switch to another cluster.
- B. In a configuration file, define the clusters, users, and contexts. Share the file with the developers and ask them to use kubect1 contig to add cluster, user, and context details.
- C. Ask the developers to install the gcloud CLI on their workstation and run gcloud container clusters get-credentials to switch to another cluster.
- D. Ask the developers to open three terminals on their workstation and use kubect1 config to configure access to each cluster.
Correct answer: C
Explanation
The correct answer is C, as installing the gcloud CLI allows developers to easily switch between clusters using the 'gcloud container clusters get-credentials' command, which is a recommended approach. Option A is incorrect because using Cloud Shell is not necessary when the gcloud CLI can be installed locally. Option B is not ideal as it involves manual configuration, which can be cumbersome, and option D is inefficient since managing multiple terminals is not practical.