Skip to main content

kubectx

#kubectx

With this tool, you don't have to make use of lengthy “kubectl config” commands to switch between contexts. This tool is particularly useful to switch context between clusters in a multi-cluster environment.

Installation: sudo git clone https://github.com/ahmetb/kubectx /opt/kubectx sudo ln -s /opt/kubectx/kubectx /usr/local/bin/kubectx

Syntax: To list all contexts: kubectx

To switch to a new context: kubectx <context_name>

To switch back to previous context: kubectx -

To see current context: kubectx -c