When using kubectl
kubectl version (jd-uat/default)
Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.2", GitCommit:"477efc3cbe6a7effca06bd1452fa356e2201e1ee", GitTreeState:"clean", BuildDate:"2017-04-19T22:51:55Z", GoVersion:"go1.8.1", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.2", GitCommit:"08e099554f3c31f6e6f07b448ab3ed78d0520507", GitTreeState:"clean", BuildDate:"2017-01-12T04:52:34Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}
i have 2 different contexts set in config trying to set context from one to another doesn't switch.
`â–¶ kubectl config current-context
od-uat
~
â–¶ kubectl config set-context oi-uat
Context "oi-uat" set.
~
â–¶ kubectl config current-context
od-uat`
And the config file still shows as
current-context: od-uat
You should use kubectl config use-context.
Doh!
Most helpful comment
You should use
kubectl config use-context.