user5594493
user5594493

Reputation: 1130

Disconnect with Azure ACS form Local Machine

Upvotes: 0

Views: 558

Answers (1)

Jason Ye
Jason Ye

Reputation: 13954

For your scenario, we can use kubectl config use-context CONTEXT_NAME to switch default cluster to others, in this way, we can switch to another k8s cluster.
We can use this command to list k8s contexts:

root@shui:~# kubectl config get-contexts
CURRENT   NAME               CLUSTER            AUTHINFO                 NAMESPACE
          jasontest321mgmt   jasontest321mgmt   jasontest321mgmt-admin   
*         jasonk8s321mgmt    jasonk8s321mgmt    jasonk8s321mgmt-admin   

Specify k8s cluster name, we can use this commandkubectl config use-context CONTEXT_NAME:

root@shui:~# 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]

For example:

root@shui:~# kubectl config use-context jasontest321mgmt
Switched to context "jasontest321mgmt".

Upvotes: 3

Related Questions