列出在 kubeconfig
中,所有環境配置詳情:
$ kubectl config view
列出當前使用的環境配置詳情:
$ kubectl config view --minify
列出在 kubeconfig
中,目前所使用的環境配置:
$ kubectl config current-context
列出在 kubeconfig
中,所有環境配置的叢集名稱:
$ kubectl config get-clusters
列出在 kubeconfig
中,所有環境配置的叢集名稱:
$ kubectl config get-contexts
修改在 kubeconfig
中,個別配置環境的名稱:
$ kubectl config rename-context <old-name> <new-name>
在 kubeconfig
中,切換使用的配置環境:
$ kubectl config use-context <name>