DISCLAIMER This project is discontinued, but there's a better version here. You may check the reasons behind that decision here. And you can see how to migrate to the new project here.
Kubectl version manager inspired by tfenv.
Currently kbenv supports the following OSes
- Mac OS X (64bit) - not really tested
- Linux
- 32bit
- 64bit
- Arm
- Arm64
- Check out kbenv into any path (
${HOME}/.kbenvin the example)
git clone https://github.com/alexppg/kbenv.git ~/.kbenv- Add
~/.binto your$PATH
echo 'export PATH="$HOME/.bin:$PATH"' >> ~/.bashrc
# Or
echo 'export PATH="$HOME/.bin:$PATH"' >> ~/.zshrc- Source the script
echo 'source $HOME/.kbenv/kbenv.sh' >> ~/.bashrc
# Or
echo 'source $HOME/.kbenv/kbenv.sh' >> ~/.zshrc$ kbenv help
Usage: kbenv <command> [<options>]
Commands:
list-remote List all installable versions
list List all installed versions
install Install a specific version
use Switch to specific version
uninstall Uninstall a specific versionList installable versions:
$ kbenv list-remote
Fetching versions...
v1.10.9
v1.10.10
v1.10.11
v1.10.12
v1.11.0
v1.11.1
v1.11.2
...List installed versions:
$ kbenv list
v1.9.11
v1.10.9Install a specific version:
$ kbenv install v1.8.14
Downloading binary...
kubectl is pointing to the v1.9.11 version
Do you want to overwrite it? (y/n)
y
Done! Now kubectl points to the v1.8.14 versionSwitch to specific version:
$ kbenv use v1.9.11
Done! Now kubectl points to the v1.9.11 versionUninstall a specific version:
$ kbenv uninstall v1.9.11
The version v1.9.11 is uninstalled!There's a similar project for managing helm versions.
GPL3