kbcli is a command line interface (CLI) tool for KubeBlocks.
kbcli has the following features:
- Manage KubeBlocks, including installation, uninstallation, viewing status, and upgrading, etc.
- Manage clusters, including creating, deleting, configuration changes, backups and restores, etc.
- Support playgrounds to quickly experience KubeBlocks locally or on the cloud.
Install the latest linux kbcli to /usr/local/bin
curl -fsSL https://kubeblocks.io/installer/install_cli.sh | bashDebian-based distributions
- Update the apt package index and install packages needed to use the kbcli apt repository:
sudo apt-get update sudo apt-get install curl
- Download the kbcli public signing key:
curl -fsSL https://apecloud.github.io/kbcli-apt/public.key | sudo apt-key add - - Add the kbcli apt repository:
echo "deb [arch=amd64,arm64] https://apecloud.github.io/kbcli-apt/repo stable main" | sudo tee /etc/apt/sources.list.d/kbcli.list
- update apt package index with the new repository and install kbcli:
sudo apt-get update sudo apt-get install kbcli
For Debian-based distributions, in addition to the installation method above, you can also install it through the following methods:
echo "deb [trusted=yes] https://apt.fury.io/kubeblocks/ /" | sudo tee /etc/apt/sources.list.d/kbcli.list
sudo apt update
sudo apt install kbcliRed Hat-based distributions
- Installs the package yum-utils using the package manager yum.
sudo yum install -y yum-utils
- Add a new repository to the YUM configuration using yum-config-manager
sudo yum-config-manager --add-repo https://yum.fury.io/kubeblocks/
- Update the local cache of available packages and metadata from all configured YUM repositories.
sudo yum makecache
- Install the kbcli.
sudo yum install kbcli --nogpgcheck
- Install the specified version of kbcli.
sudo yum install kbcli-0.6.0~beta24 --nogpgcheck
Install the latest darwin kbcli to /usr/local/bin.
curl -fsSL https://kubeblocks.io/installer/install_cli.sh | bashbrew tap apecloud/tap
brew install kbcli- Run PowerShell as an administrator and execute
Set-ExecutionPolicy Unrestricted. - Run following script to automatically install kbcli at
C:\Program Files\kbcli-windows-amd64.
powershell -Command " & ([scriptblock]::Create((iwr https://www.kubeblocks.io/installer/install_cli.ps1)))"Make sure your powershell/CMD support winget and run:
winget install kbcliscoop bucket add scoop-bucket https://github.com/apecloud/scoop-bucket.git
scoop install kbclichoco install kbcliEach release of kbcli includes various OSes and architectures. These binary versions can be manually downloaded and installed.
- Download your desired kbcli version
- Unpack it (e.g. kbcli-linux-amd64-v0.5.2.tar.gz, kbcli-darwin-amd64-v0.5.2.tar.gz)
- Move it to your desired location.
- For Linux/macOS -
/usr/local/binor any other directory in your $PATH - For Windows, create a directory and add it to you System PATH. We recommend creating a
C:\Program Files\kbclidirectory and adding it to the PATH.
- For Linux/macOS -
This guide walks you through the quickest way to get started with KubeBlocks, demonstrating how to create a demo environment (Playground) with one kbcli command.
Meet the following requirements for a smooth user experience:
-
Minimum system requirements:
- CPU: 4 cores, use
sysctl hw.physicalcpucommand to check CPU; - RAM: 4 GB, use
top -dcommand to check memory.
- CPU: 4 cores, use
-
Make sure the following tools are installed on your laptop:
kbcli playground initThis command:
- Creates a Kubernetes cluster in the container with K3d.
- Deploys KubeBlocks in the K3d cluster.
- Creates a standalone MySQL cluster.
NOTE: If you previously ran
kbcli playground initand it failed, running it again may cause errors. Please run thekbcli playground destroycommand first to clean up the environment, then runkbcli playground initagain.
Check the MySQL cluster repeatedly until the status becomes Running.
kbcli cluster listView the database cluster list.
kbcli cluster listView the details of a specified database cluster, such as STATUS, Endpoints, Topology, Images.
kbcli cluster describe myclusterkbcli playground destroySee the Reference Documentation for more information about kbcli commands.
See the Contributing Guide to get started with building and developing.
Please refer to our KubeBlocks Code of Conduct
kbcli is under the GNU Affero General Public License v3.0. See the LICENSE file for details.