Skip to content

Latest commit

 

History

History
115 lines (95 loc) · 2.4 KB

README.md

File metadata and controls

115 lines (95 loc) · 2.4 KB

kbenv

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.

Support

Currently kbenv supports the following OSes

  • Mac OS X (64bit) - not really tested
  • Linux
    • 32bit
    • 64bit
    • Arm
    • Arm64

Installation

  1. Check out kbenv into any path (${HOME}/.kbenv in the example)
git clone https://github.com/alexppg/kbenv.git ~/.kbenv
  1. Add ~/.bin to your $PATH
echo 'export PATH="$HOME/.bin:$PATH"' >> ~/.bashrc
# Or
echo 'export PATH="$HOME/.bin:$PATH"' >> ~/.zshrc
  1. Source the script
echo 'source $HOME/.kbenv/kbenv.sh' >> ~/.bashrc
# Or
echo 'source $HOME/.kbenv/kbenv.sh' >> ~/.zshrc

Usage

kbenv help

$ 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 version

kbenv list-remote

List 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
...

kbenv list

List installed versions:

$ kbenv list
v1.9.11
v1.10.9

kbenv install

Install 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 version

kbenv use

Switch to specific version:

$ kbenv use v1.9.11
Done! Now kubectl points to the v1.9.11 version

kbenv uninstall

Uninstall a specific version:

$ kbenv uninstall v1.9.11
The version v1.9.11 is uninstalled!

Related Projects

There's a similar project for managing helm versions.

License

GPL3