Professional Cloud Developer Exam QuestionsBrowse all questions from this exam

Professional Cloud Developer Exam - Question 258


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?

Show Answer
Correct Answer: C

The best practice for managing access to multiple Kubernetes clusters on Google Cloud is to use the gcloud CLI. By installing the gcloud CLI on their workstations and running the command gcloud container clusters get-credentials, developers can easily switch between clusters. This method ensures that the kubectl configuration is updated with the correct credentials for the specified cluster, allowing seamless access without changing their preferred development tools.

Discussion

7 comments
Sign in to comment
purushiOption: B
Aug 8, 2023

https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/ Command used: kubectl config use-context

RajanOption: C
Sep 25, 2023

This approach allows developers to switch between different Google Kubernetes Engine clusters directly from their local workstation1. The gcloud container clusters get-credentials command configures kubectl with the credentials of the specified cluster1, making it easy for developers to switch contexts and interact with different clusters.

WriterOption: B
Apr 26, 2023

Option B is the best solution because it is secure, convenient, and time-efficient. By using a configuration file, you can define the clusters, users, and contexts that you want to use. You can then share the file with the developers, who can use it to add the cluster, user, and context details to their kubeconfig file. Once the developers have added the cluster, user, and context details to their kubeconfig file, they can switch to another cluster by using the following command: kubectl config use <context-name>

phil_thainOption: B
Jun 14, 2023

https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/

wanrltwOption: D
Dec 18, 2023

D 100% https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/

wanrltw
Dec 18, 2023

Typo - B*

wanrltwOption: B
Dec 18, 2023

B 100% https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/

fbatagOption: C
Jul 7, 2024

We are talking about an easy way and GKE. Not K8s self-managed. A question detail is that users don't want to change the tolls they use. So C is the right.