Install KubeBlocks
KubeBlocks is Kubernetes-native, you can use Helm or kubectl with a YAML file to install it.
Environment preparation
Resource Requirements | ||
---|---|---|
Control Plane | It 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
- Install with Helm
- Install with kubectl
Use Helm and follow the steps below to install KubeBlocks.
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
Add the KubeBlocks Helm repo.
helm repo add kubeblocks https://apecloud.github.io/helm-charts
helm repo updateInstall 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.
View the available versions in the KubeBlocks Release.
Specify a version with
--version
and run the command below.helm install kubeblocks kubeblocks/kubeblocks --namespace kb-system --create-namespace --version="x.x.x"
noteBy default, the latest release version is installed.
KubeBlocks can be installed like any other resource in Kubernetes, through a YAML manifest applied via kubectl
.
Run the following command to install the latest operator manifest for this minor release:
kubectl create -f \address.yaml
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