github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/docs/user_docs/installation/install-with-helm/install-kubeblocks-with-helm.md (about)

     1  ---
     2  title: Install KubeBlocks with Helm
     3  description: Install KubeBlocks on the existing Kubernetes clusters with Helm
     4  keywords: [taints, affinity, tolerance, install, kbcli, KubeBlocks]
     5  sidebar_position: 3
     6  sidebar_label: Install KubeBlocks
     7  ---
     8  
     9  # Install KubeBlocks with Helm
    10  
    11  KubeBlocks is kubernetes-native, you can use Helm to install it.
    12  :::note
    13  
    14  If you install KubeBlocks with Helm, to uninstall it, you have to use Helm too.
    15  
    16  :::
    17  
    18  
    19  ## Environment preparation
    20  
    21  <table>
    22  	<tr>
    23  	    <th colspan="3">Resource Requirements</th>
    24  	</tr >
    25  	<tr>
    26  	    <td >Control Plane</td>
    27  	    <td colspan="2">It is recommended to create 1 node with 4 cores, 4GB memory and 50GB storage. </td>
    28  	</tr >
    29  	<tr >
    30  	    <td rowspan="4">Data Plane</td>
    31  	    <td> MySQL </td>
    32  	    <td>It is recommended to create at least 3 nodes with 2 cores, 4GB memory and 50GB storage. </td>
    33  	</tr>
    34  	<tr>
    35  	    <td> PostgreSQL </td>
    36          <td>It is recommended to create at least 2 nodes with 2 cores, 4GB memory and 50GB storage.  </td>
    37  	</tr>
    38  	<tr>
    39  	    <td> Redis </td>
    40          <td>It is recommended to create at least 2 nodes with 2 cores, 4GB memory and 50GB storage. </td>
    41  	</tr>
    42  	<tr>
    43  	    <td> MongoDB </td>
    44  	    <td>It is recommended to create at least 3 nodes with 2 cores, 4GB memory and 50GB storage. </td>
    45  	</tr>
    46  </table>
    47  
    48  ## Installation steps
    49  
    50  **Use Helm to install KubeBlocks**
    51  
    52  Run the following command:
    53  
    54  ```bash
    55  helm repo add kubeblocks https://apecloud.github.io/helm-charts
    56  helm repo update
    57  helm install kubeblocks kubeblocks/kubeblocks \
    58      --namespace kb-system --create-namespace
    59  ````
    60  
    61  If you want to install KubeBlocks with custom tolerations, you can use the following command:
    62  
    63  ```bash
    64  helm install kubeblocks kubeblocks/kubeblocks \
    65      --namespace kb-system --create-namespace \
    66      --set-json 'tolerations=[ { "key": "control-plane-taint", "operator": "Equal", "effect": "NoSchedule", "value": "true" } ]' \
    67      --set-json 'dataPlane.tolerations=[{ "key": "data-plane-taint", "operator": "Equal", "effect": "NoSchedule", "value": "true" } ]'
    68  ```
    69  
    70  If you want to install KubeBlocks with a specified version, follow the steps below.
    71  
    72  1. View the available versions in [KubeBlocks Release](https://github.com/apecloud/kubeblocks/releases/).
    73  2. Specify a version with `--version` and run the command below.
    74  
    75     ```bash
    76     helm install kubeblocks kubeblocks/kubeblocks \
    77      --namespace kb-system --create-namespace --version="x.x.x"
    78     ```
    79  
    80    :::note
    81  
    82    By default, kbcli installs the latest release version and then when installing KubeBlocks, kbcli installs the matched version. Ensure that the major versions of kbcli and KubeBlocks match.
    83  
    84    For instance, you can install kbcli v0.6.1 and KubeBlocks v0.6.3, but mismatched versions like kbcli v0.5.0 and KubeBlocks v0.6.0 may result in errors.
    85  
    86    :::
    87  
    88  ## Verify KubeBlocks installation
    89  
    90  Run the following command to check whether KubeBlocks is installed successfully.
    91  
    92  ```bash
    93  kbcli kubeblocks status
    94  ```
    95  
    96  ***Result***
    97  
    98  If the KubeBlocks Workloads are all ready, KubeBlocks has been installed successfully.
    99  
   100  ```bash
   101  KubeBlocks is deployed in namespace: kb-system,version: x.x.x
   102  >
   103  KubeBlocks Workloads:
   104  NAMESPACE   KIND         NAME                           READY PODS   CPU(CORES)   MEMORY(BYTES)   CREATED-AT
   105  kb-system   Deployment   kb-addon-snapshot-controller   1/1          N/A          N/A             Oct 13,2023 14:27 UTC+0800
   106  kb-system   Deployment   kubeblocks                     1/1          N/A          N/A             Oct 13,2023 14:26 UTC+0800
   107  kb-system   Deployment   kubeblocks-dataprotection      1/1          N/A          N/A             Oct 13,2023 14:26 UTC+0800
   108  ```