Skip to content

Commit 027cbcd

Browse files
authored
fix: show multi clusters instead of tenant (#2429)
1 parent 3a78647 commit 027cbcd

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

docs/en/guides/10-deploy/01-deploy/02-production/02-deploying-databend-on-kubernetes.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This topic explains how to install and configure the Databend cluster on Kuberne
1515

1616
**Scenario Description**
1717

18-
- This example demonstrates how to create a Databend cluster within a Kubernetes cluster that supports multi-tenancy. As illustrated, `tenant1` and `tenant2` each have their own independent Databend Query clusters, while sharing a single Databend Meta cluster.
18+
- This example demonstrates how to create multiple Databend clusters within a Kubernetes cluster.
1919
- You will need administrative access to the Kubernetes cluster. You can choose any Kubernetes node to work on, but we recommend performing operations on the management node. For this example, you'll need to install both helm and the BendSQL tool on a worker node to execute commands.
2020

2121
## Before You Begin
@@ -234,15 +234,15 @@ data-databend-meta-2 Bound pvc-08bd4ceb-15c2-47f3-a637-c1cc10441874 20Gi
234234

235235
### Step 2. Deploy a Databend Query Cluster
236236

237-
1. Create a values file with builtin user `databend:databend` and cluster name `example_cluster` with 3 nodes.
237+
1. Create a values file with builtin user `databend:databend` and cluster name `cluster1` with 3 nodes.
238238

239239
Detailed and default values are available at [documentation](https://github.com/databendlabs/helm-charts/blob/main/charts/databend-query/values.yaml)
240240

241241
```yaml
242242
replicaCount: 3
243243
config:
244244
query:
245-
clusterId: example_cluster
245+
clusterId: cluster1
246246
# add builtin user
247247
users:
248248
- name: databend
@@ -394,13 +394,13 @@ config:
394394

395395
````
396396

397-
2. Deploy the query cluster for `tenant1` in namespace `databend-query`
397+
2. Deploy the query cluster `cluster1` in namespace `databend-query`
398398

399399
```shell
400400
helm repo add databend https://charts.databend.com
401401
helm repo update databend
402402
403-
helm upgrade --install tenant1 databend/databend-query \
403+
helm upgrade --install cluster1 databend/databend-query \
404404
--namespace databend-query --create-namespace \
405405
--values values.yaml
406406
```
@@ -410,13 +410,13 @@ helm upgrade --install tenant1 databend/databend-query \
410410
```shell
411411
❯ kubectl -n databend-query get pods
412412
NAME READY STATUS RESTARTS AGE
413-
tenant1-databend-query-66647594c-lkkm9 1/1 Running 0 36s
414-
tenant1-databend-query-66647594c-lpl2s 1/1 Running 0 36s
415-
tenant1-databend-query-66647594c-4hlpw 1/1 Running 0 36s
413+
cluster1-databend-query-66647594c-lkkm9 1/1 Running 0 36s
414+
cluster1-databend-query-66647594c-lpl2s 1/1 Running 0 36s
415+
cluster1-databend-query-66647594c-4hlpw 1/1 Running 0 36s
416416
417417
❯ kubectl -n databend-query get svc
418418
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
419-
tenant1-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
419+
cluster1-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
420420
```
421421

422422
4. Access the query cluster
@@ -426,45 +426,45 @@ We use the builtin user `databend` here:
426426
- in-cluster access
427427

428428
```shell
429-
bendsql -htenant1-databend-query.databend-query.svc -P8000 -udatabend -pdatabend
429+
bendsql -hcluster1-databend-query.databend-query.svc -P8000 -udatabend -pdatabend
430430
```
431431

432432
- outside-cluster access with loadbalancer
433433

434434
```shell
435-
# the address here is the `EXTERNAL-IP` for service tenant1-databend-query above
435+
# the address here is the `EXTERNAL-IP` for service cluster1-databend-query above
436436
bendsql -h172.20.0.2 -P8000 -udatabend -pdatabend
437437
```
438438

439439
- local access with kubectl
440440

441441
```shell
442-
nohup kubectl port-forward -n databend-query svc/tenant1-databend-query 3307:3307 &
442+
nohup kubectl port-forward -n databend-query svc/cluster1-databend-query 3307:3307 &
443443
bendsql -h127.0.0.1 -P8000 -udatabend -pdatabend
444444
```
445445

446-
5. Deploy a second cluster for tenant2
446+
5. Deploy a second cluster `cluster2`
447447

448-
modify the `values.yaml` for tenant2
448+
modify the `values.yaml` for cluster2
449449

450450
```shell
451451
# optional
452452
helm repo update databend
453453
454-
helm upgrade --install tenant2 databend/databend-query \
454+
helm upgrade --install cluster2 databend/databend-query \
455455
--namespace databend-query --create-namespace \
456456
--values values.yaml
457457
```
458458

459-
```shell title="Verify the query service for tenant2 running"
459+
```shell title="Verify the query service for cluster2 running"
460460
❯ kubectl -n databend-query get pods
461461
NAME READY STATUS RESTARTS AGE
462-
tenant1-databend-query-66647594c-lkkm9 1/1 Running 0 55m
463-
tenant1-databend-query-66647594c-lpl2s 1/1 Running 0 55m
464-
tenant1-databend-query-66647594c-4hlpw 1/1 Running 0 55m
465-
tenant2-databend-query-59dcc4949f-9qg9b 1/1 Running 0 53s
466-
tenant2-databend-query-59dcc4949f-pfxxj 1/1 Running 0 53s
467-
tenant2-databend-query-59dcc4949f-mmwr9 1/1 Running 0 53s
462+
cluster1-databend-query-66647594c-lkkm9 1/1 Running 0 55m
463+
cluster1-databend-query-66647594c-lpl2s 1/1 Running 0 55m
464+
cluster1-databend-query-66647594c-4hlpw 1/1 Running 0 55m
465+
cluster2-databend-query-59dcc4949f-9qg9b 1/1 Running 0 53s
466+
cluster2-databend-query-59dcc4949f-pfxxj 1/1 Running 0 53s
467+
cluster2-databend-query-59dcc4949f-mmwr9 1/1 Running 0 53s
468468
```
469469

470470
## Maintain Databend Query Cluster
@@ -477,10 +477,10 @@ to scale up or down the query cluster, there are two ways
477477

478478
```shell
479479
# scale query cluster number to 0
480-
kubectl -n databend-query scale statefulset tenant1-databend-query --replicas=0
480+
kubectl -n databend-query scale statefulset cluster1-databend-query --replicas=0
481481
482482
# scale query cluster number to 5
483-
kubectl -n databend-query scale statefulset tenant1-databend-query --replicas=5
483+
kubectl -n databend-query scale statefulset cluster1-databend-query --replicas=5
484484
```
485485

486486
- update `replicaCount` in `values.yaml` to any value, then helm upgrade again
@@ -491,7 +491,7 @@ to scale up or down the query cluster, there are two ways
491491
```
492492

493493
```shell
494-
helm upgrade --install tenant1 databend/databend-query \
494+
helm upgrade --install cluster1 databend/databend-query \
495495
--namespace databend-query --create-namespace \
496496
--values values.yaml
497497
```
@@ -506,7 +506,7 @@ replicaCount: 3
506506
+ tag: "v0.8.123-nightly"
507507
config:
508508
query:
509-
clusterId: example_cluster
509+
clusterId: cluster1
510510
```
511511

512512
then just run again helm upgrade
@@ -515,7 +515,7 @@ then just run again helm upgrade
515515
# optional
516516
helm repo update databend
517517
518-
helm upgrade --install tenant1 databend/databend-query \
518+
helm upgrade --install cluster1 databend/databend-query \
519519
--namespace databend-query --create-namespace \
520520
--values values.yaml
521521
```
@@ -626,4 +626,4 @@ After deploying Databend, you might need to learn about the following topics:
626626
627627
<!-- <LanguageFileParse
628628
cn={<VideoCN />}
629-
/> -->
629+
/> -->

0 commit comments

Comments
 (0)