Project: StarRocks (App Definition and Development / Database)
File: helm.md

displayed_sidebar: "English" is a package manager for Kubernetes. A is a Helm package and contains all of the resource definitions necessary to run an application on a Kubernetes cluster. This topic describes how to use Helm to automatically deploy a StarRocks cluster on a Kubernetes cluster. . . Add the Helm Chart Repo for StarRocks. The Helm Chart contains the definitions of the StarRocks Operator and the custom resource StarRocksCluster. Add the Helm Chart Repo. ```Bash helm repo add starrocks-community https://starrocks.github.io/starrocks-kubernetes-operator ``` Update the Helm Chart Repo to the latest version. ```Bash helm repo update ``` View the Helm Chart Repo that you added. ```Bash $ helm search repo starrocks-community NAME CHART VERSION APP VERSION DESCRIPTION starrocks-community/kube-starrocks 1.8.0 3.1-latest kube-starrocks includes two subcharts, starrock... starrocks-community/operator 1.8.0 1.8.0 A Helm chart for StarRocks operator starrocks-community/starrocks 1.8.0 3.1-latest A Helm chart for StarRocks cluster ``` Use the default of the Helm Chart to deploy the StarRocks Operator and StarRocks cluster, or create a YAML file to customize your deployment configurations. Deployment with default configurations Run the following command to deploy the StarRocks Operator and the StarRocks cluster which consists of one FE and one BE: ```Bash $ helm install starrocks starrocks-community/kube-starrocks NAME: starrocks LAST DEPLOYED: Tue Aug 15 15:12:00 2023 NAMESPACE: starrocks STATUS: deployed REVISION: 1 TEST SUITE: None ``` Deployment with custom configurations Create a YAML file, for example, my-values.yaml, and customize the configurations for the StarRocks Operator and StarRocks cluster in the YAML file. For the supported parameters and descriptions, see the comments in the default of the Helm Chart. Run the following command to deploy the StarRocks Operator and StarRocks cluster with the custom configurations in my-values.yaml. ```Bash helm install -f my-values.yaml starrocks starrocks-community/kube-starrocks ``` Deployment takes a while. During this period, you can check the deployment status by using the prompt command in the returned result of the deployment command above. The default prompt command is as follows: ```Bash $ kubectl --namespace default get starrockscluster -l "cluster=kube-starrocks" NAME FESTATUS CNSTATUS BESTATUS kube-starrocks running running ``` You can also run `kubectl get pods` to check the deployment

If all Pods are in the `Running` state and all containers within the Pods are `READY`, the deployment has been successfully completed. ```Bash $ kubectl get pods NAME READY STATUS RESTARTS AGE kube-starrocks-be-0 1/1 Running 0 2m50s kube-starrocks-fe-0 1/1 Running 0 4m31s kube-starrocks-operator-69c5c64595-pc7fv 1/1 Running 0 4m50s ``` Access StarRocks cluster You can access the StarRocks cluster from inside and outside the Kubernetes cluster. For detailed instructions, see . Manage StarRocks operator and StarRocks cluster If you need to update the configurations of the StarRocks operator and StarRocks cluster, see . If you need to uninstall the StarRocks Operator and StarRocks cluster, run the following command: ```bash helm uninstall starrocks ``` The address of the GitHub repository: . The docs in the GitHub repository provide more information, for example: If you need to manage objects like the StarRocks cluster via the Kubernetes API, see . If you need to mount persistent volumes to FE and BE pods to store FE metadata and logs, as well as BE data and logs, see . :::danger If persistent volumes are not mounted, the StarRocks Operator will use emptyDir to store FE metadata and logs, as well as BE data and logs. When containers restart, data will be lost. ::: If you need to set the root user password: Manually set the root user's password after deploying the StarRocks cluster, see . Automatically set the root user's password when deploying the StarRocks cluster, see . How to resolve the following error that occurs after a CREATE TABLE statement is executed in a StarRocks shared-data cluster. Error message ```plaintext ERROR 1064 (HY000): Table replication num should be less than or equal to the number of available BE nodes. You can change this default by setting the replicationnum table properties. Current alive backend is [10001]. , table=orders1, defaultreplication_num=3 ``` Solution This may be because only one BE exists in that StarRocks shared-data cluster, which supports only one replica. However, the default number of replicas is 3. You can modify the number of replicas to 1 in PROPERTIES, such as, `PROPERTIES( "replication_num" = "1" )`. The address of Helm Chart maintained by StarRocks on Artifact Hub: .