Deploy Doris Cluster
After planning the cluster topology, you can deploy the Doris cluster in Kubernetes.
Deploy cluster
Deploy using Custom Resource files
Online Deployment
Deploying a cluster online requires the following steps:
- Create namespace:
kubectl create namespace $\{namespace}
- Deploy Doris cluster
kubectl apply -f ./${cluster_sample}.yaml -n $\{namespace}
Offline deployment
To deploy Doris cluster offline, you need to upload the docker image used by Doris cluster to all nodes on a machine with external network. Then use docker load to install the image on the server. Offline deployment requires the following steps:
- Download the required image
On a machine with registry access, set FE_IMAGE and BE_IMAGE to the complete image references from spec.feSpec.image and spec.beSpec.image in your cluster manifest. Pull both images and save them in one archive.
FE_IMAGE='<fe-image>'
BE_IMAGE='<be-image>'
docker pull "$FE_IMAGE"
docker pull "$BE_IMAGE"
docker save -o doris-images.tar "$FE_IMAGE" "$BE_IMAGE"
Copy the archive to each target node and load the images:
docker load -i doris-images.tar
- Create namespace:
kubectl create namespace $\{namespace}
- Deploy Doris cluster
kubectl apply -f ./${cluster_sample}.yaml -n $\{namespace}
Deploy using Helm
Online Deployment
Before installation, you need to add a deployment warehouse. If it has been added, you can directly install Doris Cluster. Otherwise, please refer to the operation of Add Deployment Warehouse when adding Deploy Doris Operator
- Install Doris Cluster
Install doriscluster, using the default configuration this deployment only deploys 3 FE and 3 BE components, using the default storageClass to implement PV dynamic provisioning.
helm install doriscluster doris-repo/doris
If you need to customize resources and cluster shapes, please customize the resource configuration according to the annotations of each resource configuration in values.yaml and execute The following command:
helm install -f values.yaml doriscluster doris-repo/doris
- Verify doris cluster installation results
You can check the pod deployment status through the kubectl get pods command. When the Pod of doriscluster is in Running state and all containers in the Pod are ready, the deployment is successful.
kubectl get pod --namespace doris
The return result is as follows:
NAME READY STATUS RESTARTS AGE
doriscluster-helm-fe-0 1/1 Running 0 1m39s
doriscluster-helm-fe-1 1/1 Running 0 1m39s
doriscluster-helm-fe-2 1/1 Running 0 1m39s
doriscluster-helm-be-0 1/1 Running 0 16s
doriscluster-helm-be-1 1/1 Running 0 16s
doriscluster-helm-be-2 1/1 Running 0 16s
Offline deployment
- Download the Doris Cluster Chart resource
On a machine with repository access, list the available chart versions. Set CHART_VERSION to the chart version you want to deploy and download the package.
helm search repo doris-repo/doris --versions
CHART_VERSION='<chart-version>'
helm pull doris-repo/doris --version "$CHART_VERSION"
- Install the Doris cluster
Copy the downloaded package to the installation machine. Set CHART_VERSION to the same value there and install from the local file:
helm install doriscluster "doris-${CHART_VERSION}.tgz"
To install with custom values.yaml settings, use:
helm install doriscluster "doris-${CHART_VERSION}.tgz" -f values.yaml
- Verify doris cluster installation results
You can check the pod deployment status through the kubectl get pods command. When the Pod of doriscluster is in Running state and all containers in the Pod are ready, the deployment is successful.
kubectl get pod --namespace doris
The return result is as follows:
NAME READY STATUS RESTARTS AGE
doriscluster-helm-fe-0 1/1 Running 0 1m39s
doriscluster-helm-fe-1 1/1 Running 0 1m39s
doriscluster-helm-fe-2 1/1 Running 0 1m39s
doriscluster-helm-be-0 1/1 Running 0 16s
doriscluster-helm-be-1 1/1 Running 0 16s
doriscluster-helm-be-2 1/1 Running 0 16s
View cluster status
Check cluster status
After the cluster deployment resources are delivered, you can use the following command to spread the cluster status.
kubectl get pods -n $\{namespace}
The return result is as follows:
NAME READY STATUS RESTARTS AGE
doriscluster-sample-fe-0 1/1 Running 0 20m
doriscluster-sample-be-0 1/1 Running 0 19m
When the STATUS of all pods is in the Running state, and all containers in the pods of all components are READY, it means that the entire cluster is deployed normally.
Check deployment resource status
Doris Operator will collect the status of cluster services and display them in the distributed resources. Doris Operator defines the abbreviation dcr for the DorisCluster type resource name, which can be replaced by the abbreviation when using the resource type to view the cluster status.
kubectl get dcr
The return result is as follows:
NAME FESTATUS BESTATUS CNSTATUS BROKERSTATUS
doriscluster-sample available available
When the STATUS of the configured related services is available, the cluster deployment is successful.