跳到主要内容

基于 Helm Chart 部署

Helm 是查找、分享和使用软件构建 Kubernetes 的最优方式。即使是最复杂的 Kubernetes 应用程序,都可以帮助您定义,安装和升级。 通过 Helm Chart ,可以轻松部署 SelectDB 集群,减少繁琐的配置步骤。

添加部署仓库

SelectDB 仓库 包含有关 doris-operator 运行的 RBAC 、部署等资源。

  1. 添加 SelectDB 的远程仓库
$ helm repo add selectdb-repo https://charts.selectdb.com
  1. 更新 Chart 为最新版本
$ helm repo update selectdb-repo
  1. 检查更新结果
$ helm search repo selectdb-repo
NAME CHART VERSION APP VERSION DESCRIPTION
selectdb-repo/doris-operator 1.3.1 1.3.1 Doris-operator for doris creat ...
selectdb-repo/doris 1.3.1 2.0.3 Apache Doris is an easy-to-use ...

安装 doris-operator

1. 安装

  • 使用默认配置安装 doris-operator,默认在名为 doris 的 namespace 里面
$ helm install operator selectdb-repo/doris-operator
  • 如果需要自定义装配 values.yaml ,可以参考如下命令:
$ helm install -f values.yaml operator selectdb-repo/doris-operator 

2. 验证

  • 通过 kubectl get pods 命令查看 Pod 的部署状态。当 doris-operator 的 Pod 处于 Running 状态且 Pod 内所有容器都已经就绪,即部署成功
$ kubectl get pod --namespace doris
NAME READY STATUS RESTARTS AGE
doris-operator-866bd449bb-zl5mr 1/1 Running 0 18m

安装 doriscluster

1. 安装

  • 安装 doriscluster,使用默认配置此部署仅部署 3个 FE 和 3个 BE 组件,使用默认 storageClass 实现 PV 动态供给
$ helm install doriscluster selectdb-repo/doris
  • 如果需要自定义资源和集群形态,请根据 values.yaml 的各个资源配置的注解自定义资源配置,并执行如下命令:
$ helm install -f values.yaml doriscluster selectdb-repo/doris 

2. 验证

执行完安装命令后,部署下发,服务部署调度以及启动会耗费一定时间

  • 通过 kubectl get pods 命令查看 Pod 的部署状态。当 doriscluster 的 Pod 处于 Running 状态且 Pod 内所有容器都已经就绪,即部署成功
$  kubectl get pod --namespace doris
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

通过 Helm 卸载 SelectDB

卸载 doriscluster

确保在该 SelectDB 集群不再使用后,使用如下命令来卸载 doriscluster

$ helm uninstall doriscluster

卸载 doris-operator

确保在 Kubernetes 中没有运行 SelectDB 后,使用如下命令来卸载 doris-operator

$ helm uninstall operator