Skip to main content
Version: Preview

Install KubeBlocks

KubeBlocks is Kubernetes-native, you can use Helm or kubectl with a YAML file to install it.

note

If you install KubeBlocks with Helm, to uninstall it, you have to use Helm too.

Make sure you have kubectl and Helm installed.

Environment preparation

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

Use Helm and follow the steps below to install KubeBlocks.

  1. Create dependent CRDs. Specify the version you want to install.

    kubectl create -f https://github.com/apecloud/kubeblocks/releases/download/vx.x.x/kubeblocks_crds.yaml
  2. Add the KubeBlocks Helm repo.

    helm repo add kubeblocks https://apecloud.github.io/helm-charts
    helm repo update
  3. Install KubeBlocks.

    helm install kubeblocks kubeblocks/kubeblocks --namespace kb-system --create-namespace

    If you want to install KubeBlocks with custom tolerations, you can use the following command:

    helm install kubeblocks kubeblocks/kubeblocks --namespace kb-system --create-namespace \
    --set-json 'tolerations=[ { "key": "control-plane-taint", "operator": "Equal", "effect": "NoSchedule", "value": "true" } ]' \
    --set-json 'dataPlane.tolerations=[{ "key": "data-plane-taint", "operator": "Equal", "effect": "NoSchedule", "value": "true" }]'

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

    1. View the available versions in the KubeBlocks Release.

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

      helm install kubeblocks kubeblocks/kubeblocks --namespace kb-system --create-namespace --version="x.x.x"
      note

      By default, the latest release version is installed.

Verify KubeBlocks installation

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

kubectl -n kb-system get pods

Result

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

NAME                                                     READY   STATUS       AGE
kb-addon-snapshot-controller-7b447684d4-q86zf 1/1 Running 33d
kb-addon-csi-hostpath-driver-0 8/8 Running 33d
kb-addon-grafana-54b9cbf65d-k8522 3/3 Running 33d
kb-addon-apecloud-otel-collector-j4thb 1/1 Running 33d
kubeblocks-5b5648bfd9-8jpvv 1/1 Running 33d
kubeblocks-dataprotection-f54c9486c-2nfmr 1/1 Running 33d
kb-addon-alertmanager-webhook-adaptor-76b87f9df8-xb74g 2/2 Running 33d
kb-addon-prometheus-server-0 2/2 Running 33d
kb-addon-prometheus-alertmanager-0 2/2 Running 33d