Before you begin
Procedure
-
Add the Helm Chart Repo for the database. The Helm Chart contains the definitions of the StarRocks Operator and the custom resource StarRocksCluster.
-
Add the Helm Chart Repo.
-
Update the Helm Chart Repo to the latest version.
-
View the Helm Chart Repo that you added.
-
Add the Helm Chart Repo.
-
Use the default values.yaml of the Helm Chart to deploy the StarRocks Operator and 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:
Tip The default
values.yamlis configured to deploy:- The operator pod with 1/2CPU and 0.8GB RAM
- One FE with 4GB RAM, 4 cores, and 15Gi disk
- One BE with 4GB RAM, 4 cores, and 1Ti disk
-
Deployment with custom configurations
- Create a YAML file, for example, my-values.yaml, and customize the configurations for the StarRocks Operator and cluster in the YAML file. For the supported parameters and descriptions, see the comments in the default values.yaml of the Helm Chart.
-
Run the following command to deploy the StarRocks Operator and cluster with the custom configurations in my-values.yaml.
If the following result is returned, the deployment has been successfully completed.You can also runkubectl get podsto check the deployment status. If all Pods are in theRunningstate and all containers within the Pods areREADY, the deployment has been successfully completed.
Next steps
- Access cluster You can access the cluster from inside and outside the Kubernetes cluster. For detailed instructions, see Access Cluster.
-
Manage StarRocks operator and cluster
- If you need to update the configurations of the StarRocks operator and cluster, see Helm Upgrade.
-
If you need to uninstall the StarRocks Operator and cluster, run the following command:
More information
- The address of the GitHub repository: starrocks-kubernetes-operator and kube-starrocks Helm Chart.
-
The docs in the GitHub repository provide more information, for example:
- If you need to manage objects like the cluster via the Kubernetes API, see API reference.
- 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 Mount Persistent Volumes by Helm Chart. 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 Change root user password HOWTO.
- Automatically set the root user’s password when deploying the StarRocks cluster, see Initialize root user password.
-
How to resolve the following error that occurs after a CREATE TABLE statement is executed in a database shared-data cluster.
-
Error message
-
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" ).
-
Error message
- The address of Helm Chart maintained by the database on Artifact Hub: kube-starrocks.