
Explanation:
Option A is correct because the gcloud config set container/cluster prod command specifically sets the default cluster for the gcloud CLI to 'prod', ensuring all subsequent commands target this cluster without needing to specify it each time. Options B, C, and D are incorrect as they either perform different functions (B updates cluster properties) or involve non-standard methods (C and D use files not recognized by gcloud CLI for default cluster settings). For more details, refer to Google Cloud's documentation on managing clusters.
Ultimate access to all questions.
As a member of the Kubernetes and Infrastructure Admin team for a digital news app, you're managing a GKE cluster named 'prod'. What's the best way to configure your local gcloud CLI to default to this cluster for all commands?
A
Execute the command gcloud config set container/cluster prod to set 'prod' as the default cluster.
B
Use the command gcloud container clusters update prod to update the cluster settings.
C
Place a file named gke.default with the cluster name in the ~/.gcloud directory.
D
Create a defaults.json file in the ~/.gcloud directory containing the cluster name.
No comments yet.