Getting Started
Concepts and Features
Backup and Restore
In Place Update
Instance Template
Trouble Shooting
References
Upgrade KubeBlocks
kbcli is the official command-line tool for managing KubeBlocks clusters. It provides:
Before installing kbcli, ensure your system meets these requirements:
Supported Platforms
kbcli is available for:
Choose your preferred installation method:
Option 1: Install with curl
To install the latest stable version:
curl -fsSL https://kubeblocks.io/installer/install_cli.sh | bash
To install a specific version:
Check the available versions in kbcli Release.
Specify a version with -s
and run the command below.
curl -fsSL https://kubeblocks.io/installer/install_cli.sh | bash -s <VERSION>
Version Compatibility
kbcli version
to check the version of kbcli and ensure that it is successfully installed.Troubleshooting If installation fails:
Option 2: Install with Homebrew
Install ApeCloud tap, the Homebrew package of ApeCloud.
brew tap apecloud/tap
Install kbcli.
brew install kbcli
If you want to install kbcli with a specified version, run the commands below.
# View the available version
brew search kbcli
# Specify a version
brew install kbcli@<VERSION>
Verify that kbcli is successfully installed.
kbcli -h
Choose your preferred installation method:
Option 1: Script Installation (Recommended)
By default, the script will be installed at C:\Program Files\kbcli-windows-amd64 and cannot be modified.
If you need to customize the installation path, use the zip file.
Run PowerShell as an administrator and execute Set-ExecutionPolicy Unrestricted
.
Install kbcli.
The following script will automatically install the environment variables at C:\Program Files\kbcli-windows-amd64.
powershell -Command " & ([scriptblock]::Create((iwr https://www.kubeblocks.io/installer/install_cli.ps1)))"
To install a specified version of kbcli, use -v
after the command and describe the version you want to install.
powershell -Command " & ([scriptblock]::Create((iwr https://www.kubeblocks.io/installer/install_cli.ps1))) -v 0.5.2"
Option 2: Manual Installation
Install using curl
:
Install kbcli.
curl -fsSL https://kubeblocks.io/installer/install_cli.sh | bash
To install a specific version:
Check the available versions in kbcli Release.
Specify a version with -s
and run the command below.
curl -fsSL https://kubeblocks.io/installer/install_cli.sh | bash -s <VERSION>
Run kbcli version
to check the version of kbcli and ensure that it is successfully installed.
To completely remove kbcli and its configuration:
For curl
, run
sudo rm /usr/local/bin/kbcli
For brew
, run
brew uninstall kbcli
kbcli creates a hidden folder named ~/.kbcli
under the HOME directory to store configuration information and temporary files. You can delete this folder after uninstalling kbcli.
Go to the kbcli
installation path and delete the installation folder.
kbcli
by script, go to C:\Program Files
and delete the kbcli-windows-amd64
folder.Delete the environment variable.
kbcli
by script, double-click Path in User variables.C:\Program Files\kbcli-windows-amd64
or your customized path and delete it. This operation requires double confirmation.Delete a folder named .kbcli
.
kbcli creates a folder named .kbcli
under the C:\Users\username directory to store configuration information and temporary files. You can delete this folder after uninstalling kbcli.
Uninstall kbcli using the curl
command.
sudo rm /usr/local/bin/kbcli
kbcli creates a hidden folder named ~/.kbcli
under the HOME directory to store configuration information and temporary files. You can delete this folder after uninstalling kbcli.
kbcli provides command completion for:
# Configure SHELL-TYPE as one type from bash, fish, PowerShell, and zsh
kbcli completion SHELL-TYPE -h
For example, enable kbcli auto-completion for zsh.
Steps:
Check the user guide.
kbcli completion zsh -h
Enable the completion function of your terminal first.
echo "autoload -U compinit; compinit" >> ~/.zshrc
Enable the kbcli
automatic completion function.
echo "source <(kbcli completion zsh); compdef _kbcli kbcli" >> ~/.zshrc