1)目的のkubernetesクラスタの状況を確認したい場合に以下のコマンドを行うようだ。
kubectl config get-contexts
============================================================
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
docker-for-desktop docker-for-desktop-cluster docker-for-desktop
gke_hardy-position-244307_asia-northeast1-a_nodejs-cluster gke_hardy-position-244307_asia-northeast1-a_nodejs-cluster gke_hardy-position-244307_asia-northeast1-a_nodejs-cluster
gke_hardy-position-244307_asia-northeast1-b_guestbook gke_hardy-position-244307_asia-northeast1-b_guestbook gke_hardy-position-244307_asia-northeast1-b_guestbook
gke_hardy-position-244307_asia-northeast1-b_persistent-disk-tutorial gke_hardy-position-244307_asia-northeast1-b_persistent-disk-tutorial gke_hardy-position-244307_asia-northeast1-b_persistent-disk-tutorial
* gke_hardy-position-244307_asia-northeast1-b_test-disk gke_hardy-position-244307_asia-northeast1-b_test-disk gke_hardy-position-244307_asia-northeast1-b_test-disk
minikube minikube minikube
=============================================================
* は、現在使用中のkubenetesのクラスタの位置。
2)以下のコマンドで、kubernetesクラスタの切り替えを行う。
赤文字の箇所が対象のkuberntesクラスタを指定する。
kubectl config use-context gke_hardy-position-244307_asia-northeast1-b_persistent-disk-tutorial
========================================================================
Switched to context "gke_hardy-position-244307_asia-northeast1-b_persistent-disk-tutorial".
========================================================================
0 件のコメント:
コメントを投稿