在 K8S 中部署存算分离 Doris 集群
本文记录了在 ubuntu 22.04 上配合 minikube 搭建的 k8s 集群,搭建 doris 存算分离集群的过程。
0. 环境信息 #
软件 | 版本 |
---|---|
OS | Ubuntu 24.04.1 LTS x86_64 |
kernel | 6.8.0-52-generic |
minikube | v1.35.0 |
kubernetes | v1.32.0 |
doris | v3.0.3 |
这里默认已经准备好了基础的 kubernetes 集群,所以也不再阐述如何通过 minikube 或者其他方式搭建 kubernetes 集群。
1. 安装 FoundationDB #
参考文档:https://doris.apache.org/zh-CN/docs/3.0/install/deploy-on-kubernetes/separating-storage-compute/install-fdb
1.1 安装 FoundationDB CRD 资源 #
kubectl apply -f https://raw.githubusercontent.com/FoundationDB/fdb-kubernetes-operator/main/config/crd/bases/apps.foundationdb.org_foundationdbclusters.yaml
kubectl apply -f https://raw.githubusercontent.com/FoundationDB/fdb-kubernetes-operator/main/config/crd/bases/apps.foundationdb.org_foundationdbbackups.yaml
kubectl apply -f https://raw.githubusercontent.com/FoundationDB/fdb-kubernetes-operator/main/config/crd/bases/apps.foundationdb.org_foundationdbrestores.yaml
1.2 部署 FoundationDB Operator #
wget https://raw.githubusercontent.com/apache/doris-operator/master/config/operator/fdb-operator.yaml
kubectl apply -f fdb-operator.yaml
1.3 部署 FoundationDB 集群 #
wget https://raw.githubusercontent.com/foundationdb/fdb-kubernetes-operator/main/config/samples/cluster.yaml -O fdb-cluster.yaml
kubectl apply -f fdb-cluster.yaml
# 查看集群状态
kubectl get fdb
# 预期输出(启动需要时间,需要等待几分钟)
NAME GENERATION RECONCILED AVAILABLE FULLREPLICATION VERSION AGE
test-cluster 1 1 true true 7.1.26 3m30s
2. 安装 Doris Operator #
2.1 安装 CRD 部署 Doris 相关资源定义 #
kubectl create -f https://raw.githubusercontent.com/apache/doris-operator/master/config/crd/bases/crds.yaml
2.2 部署 Doris Operator #
wget https://raw.githubusercontent.com/apache/doris-operator/master/config/operator/disaggregated-operator.yaml -O disaggregated-operator.yaml
kubectl apply -f disaggregated-operator.yaml
# 查看部署状态
kubectl get pod -n doris
# 预期输出
NAME READY STATUS RESTARTS AGE
doris-operator-5fd65d8d69-rgqlk 1/1 Running 0 79s
3. 部署存算分离集群 #
3.1 下载示例配置 #
wget https://raw.githubusercontent.com/apache/doris-operator/master/doc/examples/disaggregated/cluster/ddc-sample.yaml -O ddc-sample.yaml
3.2 配置 ConfigMap #
对于 ddc-sample.yaml 配置进行调整配置。这三个都需要分别配置 ConfigMap 并修改集群中的配置挂载。
...