Skip to main content
Version: release-0.9

Install KubeBlocks with kbcli

The quickest way to try out KubeBlocks is to create a new Kubernetes cluster and install KubeBlocks using the playground. However, production environments are more complex, with applications running in different namespaces and with resource or permission limitations. This document explains how to deploy KubeBlocks on an existing Kubernetes cluster.

To try out KubeBlocks on your local host, you can use the Playground or create a local Kubernetes test cluster first and then follow the steps in this tutorial to install KubeBlocks.

Environment preparation

Prepare an accessible Kubernetes cluster with the version 1.22 or above, and this cluster should meet the following requirements.

Resource Requirements
Control PlaneIt is recommended to create 1 node with 4 cores, 4GB memory and 50GB storage.
Data Plane MySQL It is recommended to create at least 3 nodes with 2 cores, 4GB memory and 50GB storage.
PostgreSQL It is recommended to create at least 2 nodes with 2 cores, 4GB memory and 50GB storage.
Redis It is recommended to create at least 2 nodes with 2 cores, 4GB memory and 50GB storage.
MongoDB It is recommended to create at least 3 nodes with 2 cores, 4GB memory and 50GB storage.

Installation steps

The command kbcli kubeblocks install installs KubeBlocks in the kb-system namespace, or you can use the --namespace flag to specify one.

kbcli kubeblocks install

If you want to install KubeBlocks with a specified version, follow the steps below.

  1. View the available versions.

    kbcli kubeblocks list-versions

    To include alpha and beta releases, use:

    kbcli kb list-versions --devel --limit=100

    Or you can view all available versions in KubeBlocks Release.

  2. Specify a version with --version and run the command below.

    kbcli kubeblocks install --version=x.y.z
    note

    By default, when installing KubeBlocks, kbcli installs the corresponding version of KubeBlocks. It's important to ensure the major versions of kbcli and KubeBlocks are the same, if you specify a different version explicitly here.

    For example, you can install kbcli v0.8.3 with KubeBlocks v0.8.1, but using mismatched major versions, such as kbcli v0.8.3 with KubeBlocks v0.9.0, may lead to errors.

Verify KubeBlocks installation

Run the following command to check whether KubeBlocks is installed successfully.

kbcli kubeblocks status

Result

If the KubeBlocks Workloads are all ready, KubeBlocks has been installed successfully.

KubeBlocks is deployed in namespace: kb-system,version: x.y.z
>
KubeBlocks Workloads:
NAMESPACE KIND NAME READY PODS CPU(CORES) MEMORY(BYTES) CREATED-AT
kb-system Deployment kb-addon-snapshot-controller 1/1 N/A N/A Oct 13,2023 14:27 UTC+0800
kb-system Deployment kubeblocks 1/1 N/A N/A Oct 13,2023 14:26 UTC+0800
kb-system Deployment kubeblocks-dataprotection 1/1 N/A N/A Oct 13,2023 14:26 UTC+0800