You are using multiple configurations for gcloud.
You want to review the configured Kubernetes Engine cluster of an inactive configuration using the fewest possible steps.
What should you do?
Click on the arrows to vote for the correct answer
A. B. C. D.D.
https://medium.com/google-cloud/kubernetes-engine-kubectl-config-b6270d2b656cThe question is asking how to review the configured Kubernetes Engine cluster of an inactive gcloud configuration using the fewest possible steps. Let's break down each of the answer choices:
A. Use gcloud config configurations describe to review the output. This command will describe the currently active configuration, not an inactive configuration. Therefore, this option is not the correct choice.
B. Use gcloud config configurations activate and gcloud config list to review the output. This option involves activating the inactive configuration and then listing the configurations to review the output. While this is a valid approach, it is not the fewest possible steps.
C. Use kubectl config get-contexts to review the output. This command will show a list of available contexts (including inactive configurations) and the current context. A context is a combination of a cluster, user, and namespace. By default, gcloud creates a context with the same name as the cluster when you create a cluster. Therefore, you can use kubectl config get-contexts to list all the available contexts, including the one for the inactive configuration. This is the correct choice.
D. Use kubectl config use-context and kubectl config view to review the output. This option involves switching to the inactive configuration using kubectl config use-context and then using kubectl config view to review the output. While this is a valid approach, it is not the fewest possible steps.
Therefore, the correct answer is C. Use kubectl config get-contexts to review the output.