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

     1  ---
     2  title: Install KubeBlocks with kbcli
     3  description: Install KubeBlocks on the existing Kubernetes clusters
     4  keywords: [taints, affinity, tolerance, install, kbcli, KubeBlocks]
     5  sidebar_position: 3
     6  sidebar_label: Install KubeBlocks
     7  ---
     8  
     9  # Install KubeBlocks with kbcli
    10  
    11  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.
    12  
    13  ## Environment preparation
    14  
    15  Prepare an accessible Kubernetes cluster with the version 1.22 or above, and this cluster should meet the following requirements.
    16  
    17  <table>
    18  	<tr>
    19  	    <th colspan="3">Resource Requirements</th>
    20  	</tr >
    21  	<tr>
    22  	    <td >Control Plane</td>
    23  	    <td colspan="2">It is recommended to create 1 node with 4 cores, 4GB memory and 50GB storage. </td>
    24  	</tr >
    25  	<tr >
    26  	    <td rowspan="4">Data Plane</td>
    27  	    <td> MySQL </td>
    28  	    <td>It is recommended to create at least 3 nodes with 2 cores, 4GB memory and 50GB storage. </td>
    29  	</tr>
    30  	<tr>
    31  	    <td> PostgreSQL </td>
    32          <td>It is recommended to create at least 2 nodes with 2 cores, 4GB memory and 50GB storage.  </td>
    33  	</tr>
    34  	<tr>
    35  	    <td> Redis </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> MongoDB </td>
    40  	    <td>It is recommended to create at least 3 nodes with 2 cores, 4GB memory and 50GB storage. </td>
    41  	</tr>
    42  </table>
    43  
    44  ## Installation steps
    45  
    46  The command `kbcli kubeblocks install` installs KubeBlocks in the `kb-system` namespace, or you can use the `--namespace` flag to specify one.
    47  
    48  ```bash
    49  kbcli kubeblocks install
    50  ```
    51  
    52  If you want to install KubeBlocks with a specified version, follow the steps below.
    53  
    54  1. View the available versions.
    55  
    56     ```bash
    57     kbcli kubeblocks list-versions
    58     ```
    59  
    60     Or you can view the available versions in [KubeBlocks Release](https://github.com/apecloud/kubeblocks/releases/).
    61  2. Specify a version with `--version` and run the command below.
    62  
    63     ```bash
    64     kbcli kubeblocks install --version=x.x.x
    65     ```
    66  
    67    :::note
    68  
    69    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.
    70  
    71    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.
    72    
    73    :::
    74  
    75  ## Verify KubeBlocks installation
    76  
    77  Run the following command to check whether KubeBlocks is installed successfully.
    78  
    79  ```bash
    80  kbcli kubeblocks status
    81  ```
    82  
    83  ***Result***
    84  
    85  If the KubeBlocks Workloads are all ready, KubeBlocks has been installed successfully.
    86  
    87  ```bash
    88  KubeBlocks is deployed in namespace: kb-system,version: x.x.x
    89  >
    90  KubeBlocks Workloads:
    91  NAMESPACE   KIND         NAME                           READY PODS   CPU(CORES)   MEMORY(BYTES)   CREATED-AT
    92  kb-system   Deployment   kb-addon-snapshot-controller   1/1          N/A          N/A             Oct 13,2023 14:27 UTC+0800
    93  kb-system   Deployment   kubeblocks                     1/1          N/A          N/A             Oct 13,2023 14:26 UTC+0800
    94  kb-system   Deployment   kubeblocks-dataprotection      1/1          N/A          N/A             Oct 13,2023 14:26 UTC+0800
    95  ```