[doc](fix) K8s doc modify catalog and add helm doc (#29604)

This commit is contained in:
catpineapple
2024-01-09 11:15:58 +08:00
committed by yiguolei
parent 87023d3b7a
commit 1d834571ab
8 changed files with 227 additions and 3 deletions

View File

@ -19,6 +19,10 @@
"message": "Docker 部署",
"description": "Make docker image and quickly start Doris's Docker cluster"
},
"sidebar.docs.category.Deploy Doris on Kubernetes": {
"message": "基于 Kubernetes 部署",
"description": "The label for category Deploy Doris on Kubernetes in sidebar docs"
},
"sidebar.docs.category.Source Code Compilation": {
"message": "源码编译",
"description": "The label for category Compile in sidebar docs"

View File

@ -65,7 +65,7 @@ After Doris supports FQDN, communication between nodes is entirely based on FQDN
After an unexpected restart of the Pod, K8s cannot guarantee that the Pod's IP will not change, but it can ensure that the domain name remains unchanged. Based on this feature, when Doris enables FQDN, it can ensure that the Pod can still provide services normally after an unexpected restart.
Please refer to the method for deploying Doris in K8s[Kubernetes Deployment](../../install/k8s-deploy.md)
Please refer to the method for deploying Doris in K8s[Kubernetes Deployment](../../install/k8s-deploy/operator-deploy.md)
### Server change IP

View File

@ -0,0 +1,108 @@
---
{
"title": "Deploy Doris on Helm Chart",
"language": "en"
}
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
[Helm](https://helm.sh/) is the best way to find, share, and use software built for Kubernetes. Helm Charts help to define, install, and upgrade even the most complex Kubernetes application.
Helm Chart makes it easy to deploy Doris clusters and skip difficult configuration steps.
## Add Helm repository of Doris-Operator
This [Doris repository](https://artifacthub.io/packages/search?ts_query_web=doris&sort=relevance&page=1) have resources about RBAC , deployment ...etc for doris-operator running.
1. Add the Doris repository
```Bash
$ helm repo add doris-repo https://charts.selectdb.com
```
2. Update the Chart to the latest version
```Bash
$ helm repo update doris-repo
```
3. Check the Helm Chart Repo is the latest version
```Bash
$ helm search repo doris-repo
NAME CHART VERSION APP VERSION DESCRIPTION
doris-repo/doris-operator 1.3.1 1.3.1 Doris-operator for doris creat ...
doris-repo/doris 1.3.1 2.0.3 Apache Doris is an easy-to-use ...
```
## Install doris-operator
### 1. Install
- Install [doris-operator](https://artifacthub.io/packages/helm/doris/doris-operator),with default config in a namespace named `doris`
```Bash
$ helm install operator doris-repo/doris-operator
```
- The repo defines the basic function for running doris-operator, Please use next command to deploy operator, when you have completed customization of [values.yaml](https://artifacthub.io/packages/helm/doris/doris-operator?modal=values)
```Bash
$ helm install -f values.yaml operator doris-repo/doris-operator
```
### 2. Validate installation Status
Check the deployment status of Pods through the `kubectl get pods` command.
Observe that the Pod of doris-operator is in the Running state and all containers in the Pod are ready, that means, the deployment is successful.
```Bash
$ kubectl get pod --namespace doris
NAME READY STATUS RESTARTS AGE
doris-operator-866bd449bb-zl5mr 1/1 Running 0 18m
```
## Install doriscluster
### 1. Install
- Use default config for deploying [doriscluster](https://artifacthub.io/packages/helm/doris/doris). This only deploys 3 FE and 3 BE components and using default `storageClass` for providing persistent volume.
```Bash
$ helm install doriscluster doris-repo/doris
```
- Custom Doris deploying, specify resources or different deployment type, please customize the resource configuration according to the annotations of each resource configuration in [values.yaml](https://artifacthub.io/packages/helm/doris/doris?modal=values) and use next command for deploying.
```Bash
$ helm install -f values.yaml doriscluster doris-repo/doris
```
### 2. Validate installation Status
After executing the installation command, deployment and distribution, service deployment scheduling and startup will take a certain amount of time.
Check the deployment status of Pods through the `kubectl get pods` command.
Observe that the Pod of `doriscluster` is in the `Running` state and all containers in the Pod are ready, that means, the deployment is successful.
```Bash
$ 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
```
## Uninstall Doris by Helm
### Uninstall doriscluster
Please confirm the Doris is not used, when using next command to uninstall `doriscluster`.
```bash
$ helm uninstall doriscluster
```
### Uninstall doris-operator
Please confirm that Doris is not running in Kubernetes, use next command to uninstall `doris-operator`.
```bash
$ helm uninstall operator
```

View File

@ -21,7 +21,14 @@
"install/construct-docker/run-docker-cluster"
]
},
"install/k8s-deploy",
{
"type": "category",
"label": "Deploy Doris on Kubernetes",
"items": [
"install/k8s-deploy/operator-deploy",
"install/k8s-deploy/helm-chart-deploy"
]
},
{
"type": "category",
"label": "Source Code Compilation",

View File

@ -65,7 +65,7 @@ Doris 支持 FQDN 之后,各节点之间通信完全基于 FQDN。添加各类
Pod 意外重启后,K8s 不能保证 Pod 的 IP 不发生变化,但是能保证域名不变,基于这一特性,Doris 开启 FQDN 时,能保证 Pod 意外重启后,还能正常提供服务。
K8s 部署 Doris 的方法请参考[K8s 部署doris](../../install/k8s-deploy.md)
K8s 部署 Doris 的方法请参考[K8s 部署 Doris](../../install/k8s-deploy/operator-deploy.md)
### 服务器变更 IP

View File

@ -0,0 +1,105 @@
---
{
"title": "基于 Helm Chart 部署",
"language": "zh-CN"
}
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
[Helm](https://helm.sh/zh/) 是查找、分享和使用软件构建 Kubernetes 的最优方式。即使是最复杂的 Kubernetes 应用程序,都可以帮助您定义,安装和升级。
通过 Helm Chart ,可以轻松部署 Doris 集群,减少繁琐的配置步骤。
## 添加部署仓库
该 [Doris 仓库](https://artifacthub.io/packages/search?ts_query_web=doris&sort=relevance&page=1) 包含有关 doris-operator 运行的 RBAC 、部署等资源。
1. 添加 Doris 的远程仓库
```Bash
$ helm repo add doris-repo https://charts.selectdb.com
```
2. 更新 Chart 为最新版本
```Bash
$ helm repo update doris-repo
```
3. 检查更新结果
```Bash
$ helm search repo doris-repo
NAME CHART VERSION APP VERSION DESCRIPTION
doris-repo/doris-operator 1.3.1 1.3.1 Doris-operator for doris creat ...
doris-repo/doris 1.3.1 2.0.3 Apache Doris is an easy-to-use ...
```
## 安装 doris-operator
### 1. 安装
- 使用默认配置安装 [doris-operator](https://artifacthub.io/packages/helm/doris/doris-operator),默认在名为 `doris` 的 namespace 里面
```Bash
$ helm install operator doris-repo/doris-operator
```
- 如果需要自定义装配 [values.yaml](https://artifacthub.io/packages/helm/doris/doris-operator?modal=values) ,可以参考如下命令:
```Bash
$ helm install -f values.yaml operator doris-repo/doris-operator
```
### 2. 验证
- 通过 `kubectl get pods` 命令查看 Pod 的部署状态。当 doris-operator 的 Pod 处于 Running 状态且 Pod 内所有容器都已经就绪,即部署成功
```Bash
$ kubectl get pod --namespace doris
NAME READY STATUS RESTARTS AGE
doris-operator-866bd449bb-zl5mr 1/1 Running 0 18m
```
## 安装 doriscluster
### 1. 安装
- 安装 [doriscluster](https://artifacthub.io/packages/helm/doris/doris),使用默认配置此部署仅部署 3个 FE 和 3个 BE 组件,使用默认 `storageClass` 实现 PV 动态供给
```Bash
$ helm install doriscluster doris-repo/doris
```
- 如果需要自定义资源和集群形态,请根据 [values.yaml](https://artifacthub.io/packages/helm/doris/doris?modal=values) 的各个资源配置的注解自定义资源配置,并执行如下命令:
```Bash
$ helm install -f values.yaml doriscluster doris-repo/doris
```
### 2. 验证
执行完安装命令后,部署下发,服务部署调度以及启动会耗费一定时间
- 通过 `kubectl get pods` 命令查看 Pod 的部署状态。当 `doriscluster` 的 Pod 处于 `Running` 状态且 Pod 内所有容器都已经就绪,即部署成功
```Bash
$ 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 卸载 Doris
### 卸载 doriscluster
确保在该 Doris 集群不再使用后,使用如下命令来卸载 `doriscluster`
```bash
$ helm uninstall doriscluster
```
### 卸载 doris-operator
确保在 Kubernetes 中没有运行 Doris 后,使用如下命令来卸载 `doris-operator`
```bash
$ helm uninstall operator
```