Topic 1 Question 241
You used the gcloud container clusters command to create two Google Cloud Kubernetes (GKE) clusters: prod-cluster and dev-cluster.
• prod-cluster is a standard cluster. • dev-cluster is an auto-pilot cluster.
When you run the kubectl get nodes command, you only see the nodes from prod-cluster. Which commands should you run to check the node status for dev-cluster?
gcloud container clusters get-credentials dev-cluster kubectl get nodes
gcloud container clusters update -generate-password dev-cluster kubectl get nodes
kubectl config set-context dev-cluster kubectl cluster-info
kubectl config set-credentials dev-cluster kubectl cluster-info
ユーザの投票
コメント(6)
It should be A
👍 2Speridian2023/08/01- 正解だと思う選択肢: A
The gcloud container clusters get-credentials command sets the Kubernetes context to the specified cluster (in this case, dev-cluster). This ensures that the subsequent kubectl commands will be executed against the dev-cluster. After setting the context, the kubectl get nodes command is used to retrieve the node status for the dev-cluster, showing the list of nodes in the cluster.
👍 2qannik2023/08/05 - 正解だと思う選択肢: A
gcloud container clusters get-credentials updates a kubeconfig file with appropriate credentials and endpoint information to point kubectl at a specific cluster in Google Kubernetes Engine
👍 23arle2023/08/08
シャッフルモード