と通信kubectl command
を走った、私たちはこのように、我々は別のK8Sのクラスタに切り替えることができ、他の人にデフォルトのクラスタを切り替えるkubectl config use-context CONTEXT_NAME
を使用することができます。
我々はリストにこのコマンドを使用することができますが、コンテキストをK8S:たとえば
[email protected]:~# kubectl config use-context -h
Sets the current-context in a kubeconfig file
Examples:
# Use the context for the minikube cluster
kubectl config use-context minikube
Usage:
kubectl config use-context CONTEXT_NAME [options]
:
[email protected]:~# kubectl config get-contexts
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
jasontest321mgmt jasontest321mgmt jasontest321mgmt-admin
* jasonk8s321mgmt jasonk8s321mgmt jasonk8s321mgmt-admin
たちは、このコマンドkubectl config use-context CONTEXT_NAME
を使用することができ、K8Sクラスタ名を指定して
[email protected]:~# kubectl config use-context jasontest321mgmt
Switched to context "jasontest321mgmt".