How to switch kubectl clusters between gcloud and minikube

后端 未结 14 1325
再見小時候
再見小時候 2021-01-29 19:01

I have Kubernetes working well in two different environments, namely in my local environment (MacBook running minikube) and as well as on Google\'s Container Engine (GCE, Kubern

14条回答
  •  花落未央
    2021-01-29 19:48

    Latest 2020 answer is here,

    A simple way to switch between kubectl context,

    kubectl top nodes **--context=**context01name
    
    kubectl top nodes --context=context02name
    

    You can also store the context name as env like context01name=gke_${GOOGLE_CLOUD_PROJECT}_us-central1-a_standard-cluster-1

提交回复
热议问题