A shell tool for kubectl contexts switch quickly, alias for kebectl config use-context
The tool depends kubectl
, assume that you can already use kebectl
curl https://raw.githubusercontent.com/lfbear/k/main/install.sh | bash
git clone https://github.com/lfbear/k
cd k && sh install.sh
Add source ~/.kube/k.sh
to the bottom of your bash startup files, this file locate at one of the following file
- [linux bash]
~/.bashrc
- [Darwin native bash]
~/.bash_profile
- [zsh for linux or Darwin]
~/.zshrc
- ...
# k
# k dev
then, u can use kubectl
to do anything you want
- 2021.07.02 Add CurrentContext to the bash PS1 (issue #1)
https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/