Get Started
This document introduces how to create a simple Kubernetes cluster and use it to deploy a basic test Doris cluster usingDoris Operator.
Step 1: Create a test Kubernetes
kind is suitable for running a local Kubernetes cluster using Docker containers.
Install kind and kubectl with the following commands:
Create a Kubernetes cluster:
kind create cluster
Check whether the Kubernetes cluster was created successfully:
kubectl cluster-info
Step 2: Deploy Doris Operator
Doris Operator supports two installation methods: Kustomized and Helm. It is recommended to use Kustomized for installation.
Install Doris Operator:
mkdir doris-operator
flux pull artifact oci://ghcr.io/linsoss/kustomize/doris-operator:1.0.4 --output ./doris-operator/
kubectl apply -k doris-operator
To confirm that the Doris Operator components are running, run the following command:
kubectl get pods -n doris-operator-system
Once all the Pods are in the “Running” state, you can proceed to the next step.
Step 3: Deploy a Doris cluster and monitor
Deploy Doris Cluster
kubectl create ns doris kubectl apply -n doris -f https://raw.githubusercontent.com/linsoss/doris-operator/dev/examples/basic/doris-cluster.yaml
Deploy Doris Cluster Monitor
kubectl apply -n doris -f https://raw.githubusercontent.com/linsoss/doris-operator/dev/examples/basic/doris-monitor.yaml
View the Pod Status
watch kubectl get po -n doris
Once all components’ pods are started, each component type (FE, BE, CN, Broker) should be in the Running state.
Step 4: Connect to the Doris Cluster
Connect to Doris SQL Service
Forward the FE Service in Kubernetes for local access:
kubectl port-forward -n doris svc/doris-fe 8030:8030 > /dev/null 2>&1 &
You can use the
mysql
command-line tool to connect to Doris.mysql -h 127.0.0.1 -P 9030 -u root
Access Doris FE UI
Forward the HTTP port of the FE Service in Kubernetes:
kubectl port-forward -n doris svc/doris-fe 8030:8030 > /dev/null 2>&1 &
Then open http://localhost:8030 in your browser.
Access Grafana Dashboard
Forward the Grafana Service in Kubernetes for local access:
kubectl port-forward -n doris svc/basic-monitor-grafana 3000:3000 > /dev/null 2>&1 &
Then open http://localhost:3000 in your browser. The default username and password are both
admin
.Explore Doris Grafana
Step 5: Destroy the Doris and Kubernetes cluster
After testing, you may want to destroy the Doris cluster and Kubernetes cluster.
Stop kubectl Port Forwarding
If you still have
kubectl
processes running that forward ports, terminate them:pgrep -lfa kubectl
Destroy the Doris Cluster
# Delete Doris Cluster kubectl delete dc basic -n doris # Delete Doris Monitor kubectl delete dm basic-monitor -n doris # Delete PV data and other resources kubectl delete pvc,secret,serviceaccount,rolebinding,role --selector=app.kubernetes.io/name=doris-cluster -n doris
Destroy Kubernetes Cluster
kind delete cluster
See also
If you are interested in deploying a Doris cluster in production environments, refer to the following documents: