You maintain multiple gcloud configurations and want to inspect the Kubernetes Engine cluster referenced by an inactive configuration with the fewest steps. What should you run?
Choose an answer
Tap an option to check your answer.
Correct answer: kubectl config use-context `<context>` and kubectl config view to inspect that cluster context..
Why this is the answer
The correct answer is kubectl config use-context <context and kubectl config view because this directly manipulates and inspects Kubernetes contexts, which are distinct from gcloud configurations. gcloud configurations manage settings for the Google Cloud SDK, while kubectl contexts manage access to Kubernetes clusters. To inspect a Kubernetes Engine cluster referenced by an inactive gcloud configuration without activating that gcloud configuration, you need to directly switch the kubectl context to the desired cluster and then view its details. gcloud config configurations describe only shows gcloud configuration details, not Kubernetes cluster information. gcloud config configurations activate would change your active gcloud configuration, which is not the "fewest steps" if you only want to inspect the cluster. kubectl config get-contexts lists available contexts but doesn't inspect a specific one in detail.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed