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:

  1. Create namespace:
  1. kubectl create namespace ${namespace}
  1. Deploy Doris cluster
  1. 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:

  1. Download the required image

Deploying Doris cluster requires the following images:

  1. selectdb/doris.fe-ubuntu:2.0.2
  2. selectdb/doris.be-ubuntu:2.0.2

Download the image locally and package it into a tar file

  1. ## download docker image
  2. docker pull selectdb/doris.fe-ubuntu:2.0.2
  3. docker pull selectdb/doris.be-ubuntu:2.0.2
  4. ## save docker image as a tar package
  5. docker save -o doris.fe-ubuntu-v2.0.2.tar selectdb/doris.fe-ubuntu:2.0.2
  6. docker save -o doris.be-ubuntu-v2.0.2.tar docker pull selectdb/doris.be-ubuntu:2.0.2

Upload the image tar package to the server and execute the docker load command:

  1. ## load docker image
  2. docker load -i doris.fe-ubuntu-v2.0.2.tar
  3. docker load -i doris.be-ubuntu-v2.0.2.tar
  1. Create namespace:
  1. kubectl create namespace ${namespace}
  1. Deploy Doris cluster
  1. 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

  1. 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.

  1. 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:

  1. helm install -f values.yaml doriscluster doris-repo/doris
  1. 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.

  1. kubectl get pod --namespace doris

The return result is as follows:

  1. NAME READY STATUS RESTARTS AGE
  2. doriscluster-helm-fe-0 1/1 Running 0 1m39s
  3. doriscluster-helm-fe-1 1/1 Running 0 1m39s
  4. doriscluster-helm-fe-2 1/1 Running 0 1m39s
  5. doriscluster-helm-be-0 1/1 Running 0 16s
  6. doriscluster-helm-be-1 1/1 Running 0 16s
  7. doriscluster-helm-be-2 1/1 Running 0 16s

Offline deployment

  1. Download the Doris Cluster Chart resource

Download doris-{chart_version}.tgz to install Doris Cluster chart. If you need to download the 2.0.6 version of the Doris cluster, you can use the following command:

  1. wget https://charts.selectdb.com/doris-2.0.6.tgz
  1. Install Doris cluster

Doris cluster can be installed through the helm install command.

  1. helm install doriscluster doris-1.4.0.tgz

If you need to customize the assembly values.yaml, you can refer to the following command:

  1. helm install -f values.yaml doriscluster doris-1.4.0.tgz
  1. 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.

  1. kubectl get pod --namespace doris

The return result is as follows:

  1. NAME READY STATUS RESTARTS AGE
  2. doriscluster-helm-fe-0 1/1 Running 0 1m39s
  3. doriscluster-helm-fe-1 1/1 Running 0 1m39s
  4. doriscluster-helm-fe-2 1/1 Running 0 1m39s
  5. doriscluster-helm-be-0 1/1 Running 0 16s
  6. doriscluster-helm-be-1 1/1 Running 0 16s
  7. doriscluster-helm-be-2 1/1 Running 0 16s

View cluster status

Check cluster status

After the cluster deployment resources are delivered, you can check the cluster status by running the following command.

  1. kubectl get pods -n ${namespace}

The return result is as follows:

  1. NAME READY STATUS RESTARTS AGE
  2. doriscluster-sample-fe-0 1/1 Running 0 20m
  3. 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.

  1. kubectl get dcr

The return result is as follows:

  1. NAME FESTATUS BESTATUS CNSTATUS BROKERSTATUS
  2. doriscluster-sample available available

When the STATUS of the configured related services is available, the cluster deployment is successful.