Google CloudでKubernetesのContextを切り替える

gcloudコマンドでクラスタを探す

gcloud container clusters list --location asia-northeast1

gcloud container clusters get-credentials ${Cluster Name} --location asia-northeast1 --project ${Goole Cloud Project ID}

kubectlコマンドで現在のContextを把握する

# 現在のContextを表示する
kubectl config current-context

# 指定可能なContextを列挙する
kubectl config get-contexts

kubectlコマンドでContextを切り替える

kubectl config use-context ${Cluster Name}