11``` yaml title="values.yaml"
2- cluster : example_cluster
3- replicaCount : 3
2+ meta :
3+ address : " databend-meta.databend-meta.svc.cluster.local:9191"
4+ endpoints :
5+ - " databend-meta-0.databend-meta.databend-meta.svc.cluster.local:9191"
6+ - " databend-meta-1.databend-meta.databend-meta.svc.cluster.local:9191"
7+ - " databend-meta-2.databend-meta.databend-meta.svc.cluster.local:9191"
48
5- query :
6- users :
7- databend :
8- password : databend
9+ cluster : " example_cluster"
910
10- meta :
11- endpoint : databend-meta.databend-meta.svc.cluster.local:9191
11+ replicaCount : 3
12+
13+ users :
14+ - name : databend
15+ password : databend
1216
1317storage :
1418 type : s3
1519 s3 :
16- bucket : databend-bucket
17- region : us-east-1
18- access_key_id : <your-access-key-id>
19- secret_access_key : <your-secret-access-key>
20+ bucket : " databend"
21+ region : " us-east-1"
22+ access_key_id : " <your-access-key-id>"
23+ secret_access_key : " <your-secret-access-key>"
2024
2125serviceMonitor :
2226 enabled : true
@@ -38,53 +42,29 @@ NAME READY STATUS RESTARTS AGE
3842databend-query-0 1/1 Running 0 5m36s
3943databend-query-1 1/1 Running 0 4m53s
4044databend-query-2 1/1 Running 0 4m18s
41-
42- ❯ kubectl -n databend-query get svc
43- NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
44- databend-query ClusterIP 10.96.123.123 <none> 8000/TCP,8080/TCP 5m45s
4545` ` `
4646
47- # ## Step 3. Access Databend Query Cluster
47+ # ## Step 3. Access Databend Query
4848
49- 1. Forward the service port to local
49+ 1. Expose the service to access Databend Query
5050
5151` ` ` shell
52- kubectl -n databend-query port-forward svc/databend-query 8000:8000
52+ kubectl -n databend-query port-forward svc/databend-query 8000:80
5353` ` `
5454
55- 2. Connect to the Databend Query cluster using BendSQL
55+ 2. Use BendSQL to connect to Databend Query
5656
5757` ` ` shell
5858bendsql --dsn "databend://databend:databend@localhost:8000?sslmode=disable"
5959` ` `
6060
61- 3. Verify the connection
62-
63- ` ` ` shell
64- ❯ bendsql
65- Welcome to BendSQL 0.7.4!
66- Connecting to databend://databend:databend@localhost:8000?sslmode=disable...
67- Connected to Databend server version 0.7.4
68-
69- databend :) SELECT 1;
70-
71- SELECT 1;
72-
73- ┌─1─┐
74- │ 1 │
75- └───┘
76-
77- 1 row in set. Query took 0.001 seconds.
78- ` ` `
79-
8061# # Next Steps
8162
82- - Learn more about Databend by reading the [Databend Documentation](https://databend.rs/doc).
83- - Explore the [Databend GitHub Repository](https://github.com/datafuselabs/databend) to see the source code and contribute.
84-
85- {/*examples*/}
63+ Congratulations! You have successfully deployed a Databend cluster on Kubernetes.
8664
87- 详细和默认值可在[文档](https://github.com/datafuselabs/helm-charts/blob/main/charts/databend-query/values.yaml)中找到。
65+ - Learn more about Databend : [Databend Overview](/guides/overview)
66+ - Explore Databend Cloud : [Databend Cloud](https://databend.com)
67+ - Join our community : [Databend Community](https://databend.com/community)
8868
8969` ` ` yaml
9070replicaCount: 3
@@ -94,7 +74,7 @@ config:
9474 # 添加内置用户
9575 users:
9676 - name: databend
97- # 可用类型: sha256_password, double_sha1_password, no_password, jwt
77+ # 可用类型: sha256_password, double_sha1_password, no_password, jwt
9878 authType: double_sha1_password
9979 # echo -n "databend" | sha1sum | cut -d' ' -f1 | xxd -r -p | sha1sum
10080 authString: 3081f32caef285c232d066033c89a78d88a6d8a5
@@ -124,14 +104,14 @@ service:
124104
125105` ` ` ` mdx-code-block
126106
127- :::caution 关于 LoadBalancer
107+ :::caution 关于LoadBalancer
128108当将服务类型设置为 `LoadBalancer` 时,
129- 几乎所有云平台都会为查询服务分配一个公网 IP 地址 ,
109+ 几乎所有云平台都会为查询服务分配一个公网IP地址 ,
130110这可能会导致安全问题。
131111
132- 因此,需要使用注解来告知云平台创建一个内部负载均衡器 。
112+ 然后需要使用注解来告知云平台创建一个内部负载均衡器 。
133113
134- 对于不同的云提供商 :
114+ 对于不同的云服务提供商 :
135115
136116
137117<Tabs>
@@ -150,7 +130,7 @@ service:
150130
151131</TabItem>
152132
153- <TabItem value="aliyun" label="Alibaba Cloud ">
133+ <TabItem value="aliyun" label="阿里云 ">
154134
155135 ` ` ` yaml
156136 service:
@@ -189,14 +169,14 @@ config:
189169
190170</TabItem>
191171
192- <TabItem value="aliyun" label="OSS(Alibaba Cloud )">
172+ <TabItem value="aliyun" label="OSS(阿里云 )">
193173
194- ` ` ` yaml title="使用 s3 客户端的 oss "
174+ ` ` ` yaml title="使用s3客户端的oss "
195175config:
196176 storage:
197177 type: s3
198178 s3:
199- # 区域端点 URL
179+ # 区域端点URL
200180 endpoint_url: "https://oss-ap-southeast-1.aliyuncs.com"
201181 bucket: "<bucket>"
202182 access_key_id: "<key>"
@@ -205,12 +185,12 @@ config:
205185 enable_virtual_host_style: true
206186` ` `
207187
208- ` ` ` yaml title="原生 oss "
188+ ` ` ` yaml title="原生oss "
209189config:
210190 storage:
211191 type: oss
212192 oss:
213- # 区域端点 URL
193+ # 区域端点URL
214194 endpoint_url: "https://oss-ap-southeast-1.aliyuncs.com"
215195 bucket: "<bucket>"
216196 access_key_id: "<key>"
@@ -219,14 +199,14 @@ config:
219199
220200</TabItem>
221201
222- <TabItem value="qcloud" label="COS(Tencent Cloud )">
202+ <TabItem value="qcloud" label="COS(腾讯云 )">
223203
224- ` ` ` yaml title="原生 cos "
204+ ` ` ` yaml title="原生cos "
225205config:
226206 storage:
227207 type: cos
228208 cos:
229- # 区域端点 URL
209+ # 区域端点URL
230210 endpoint_url: "https://cos.ap-singapore.myqcloud.com"
231211 bucket: "test-databend-1234567890"
232212 access_key_id: "<key>"
@@ -241,7 +221,7 @@ config:
241221
242222` ` ` `
243223
244- 2. 在命名空间 `databend-query` 中为 `tenant1` 部署查询集群
224+ 2. 在命名空间 `databend-query` 中为 `tenant1` 部署查询计算集群
245225
246226` ` ` shell
247227helm repo add databend https://charts.databend.com
@@ -266,7 +246,7 @@ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
266246tenant1-databend-query LoadBalancer 10.43.84.243 172.20.0.2 8080:32063/TCP,9000:31196/TCP,9090:30472/TCP,8000:30050/TCP,7070:31253/TCP,3307:31367/TCP 17m
267247` ` `
268248
269- 4. 访问查询集群
249+ 4. 访问查询计算集群
270250
271251我们在这里使用内置用户 `databend`:
272252
@@ -276,21 +256,21 @@ tenant1-databend-query LoadBalancer 10.43.84.243 172.20.0.2 8080:32063/
276256 bendsql -htenant1-databend-query.databend-query.svc -P8000 -udatabend -pdatabend
277257 ` ` `
278258
279- - 集群外访问,使用负载均衡器
259+ - 集群外访问(通过负载均衡器)
280260
281261 ` ` ` shell
282262 # 这里的地址是上面服务 tenant1-databend-query 的 ` EXTERNAL-IP`
283263 bendsql -h172.20.0.2 -P8000 -udatabend -pdatabend
284264 ` ` `
285265
286- - 使用 kubectl 本地访问
266+ - 本地访问(通过kubectl)
287267
288268 ` ` ` shell
289269 nohup kubectl port-forward -n databend-query svc/tenant1-databend-query 3307:3307 &
290270 bendsql -h127.0.0.1 -P8000 -udatabend -pdatabend
291271 ` ` `
292272
293- 5. 为 tenant2 部署第二个集群
273+ 5. 为 tenant2 部署第二个计算集群
294274
295275修改 ` values.yaml` 为 tenant2
296276
@@ -314,23 +294,23 @@ tenant2-databend-query-59dcc4949f-pfxxj 1/1 Running 0 53s
314294tenant2-databend-query-59dcc4949f-mmwr9 1/1 Running 0 53s
315295` ` `
316296
317- # # 维护 Databend 查询集群
297+ # # 维护 Databend 查询计算集群
318298
319299# ## 扩展
320300
321- 要扩展或缩减查询集群 ,有两种方法
301+ 要扩展或缩减查询计算集群 ,有两种方法
322302
323303- 直接使用 `kubectl`
324304
325305 ` ` ` shell
326- # 将查询集群数量扩展到 0
306+ # 将查询计算集群数量缩减到 0
327307 kubectl -n databend-query scale statefulset tenant1-databend-query --replicas=0
328308
329- # 将查询集群数量扩展到 5
309+ # 将查询计算集群数量扩展到 5
330310 kubectl -n databend-query scale statefulset tenant1-databend-query --replicas=5
331311 ` ` `
332312
333- - 更新 `values.yaml` 中的 `replicaCount` 为任意值 ,然后再次运行 helm upgrade
313+ - 将 `values.yaml` 中的 `replicaCount` 更新为任意值 ,然后再次运行 helm upgrade
334314
335315 ` ` ` diff title="diff values.yaml"
336316 - replicaCount: 3
@@ -345,7 +325,7 @@ tenant2-databend-query-59dcc4949f-mmwr9 1/1 Running 0 53s
345325
346326# ## 升级
347327
348- 要升级查询集群,我们需要修改上述查询集群的 `values.yaml`。
328+ 要升级查询计算集群,我们需要修改上述查询计算集群的 `values.yaml`。
349329
350330` ` ` diff title="diff values.yaml"
351331replicaCount: 3
@@ -367,7 +347,7 @@ helm upgrade --install tenant1 databend/databend-query \
367347 --values values.yaml
368348` ` `
369349
370- # ## 检查集群信息
350+ # ## 检查计算集群信息
371351
372352` ` ` sql
373353❯ select * from system.clusters;
@@ -455,7 +435,7 @@ SELECT count(*) FROM t1;
455435## 监控 Meta 和 Query 计算集群
456436
457437:::info
458- 部署 meta 和 query 计算集群时,应启用 `serviceMonitor`。
438+ 注意,在部署 meta 和 query 计算集群时,应启用 `serviceMonitor`。
459439:::
460440
461441- 从以下地址下载 grafana 仪表盘文件:[datafuselabs/helm-charts](https://github.com/datafuselabs/helm-charts/tree/main/dashboards)。
0 commit comments