From 3ff4e210691a9526e7da48ec9b5c92475fe949b0 Mon Sep 17 00:00:00 2001 From: chengshiwen Date: Fri, 26 Feb 2021 19:04:45 +0800 Subject: [PATCH] [Improvement][K8s] Add readme to use namespace, access ui and delete pv --- docker/build/README.md | 2 +- docker/build/README_zh_CN.md | 1 + docker/kubernetes/dolphinscheduler/README.md | 48 +++++++++++++++++--- 3 files changed, 44 insertions(+), 7 deletions(-) diff --git a/docker/build/README.md b/docker/build/README.md index 291db1f9a6..dd567ba9b9 100644 --- a/docker/build/README.md +++ b/docker/build/README.md @@ -23,7 +23,7 @@ The default **postgres** user `root`, postgres password `root` and database `dol The default **zookeeper** is created in the `docker-compose.yml`. -Access the Web UI:http://192.168.xx.xx:12345/dolphinscheduler +Access the Web UI: http://192.168.xx.xx:12345/dolphinscheduler The default username is `admin` and the default password is `dolphinscheduler123` diff --git a/docker/build/README_zh_CN.md b/docker/build/README_zh_CN.md index 61d963e673..6286559970 100644 --- a/docker/build/README_zh_CN.md +++ b/docker/build/README_zh_CN.md @@ -14,6 +14,7 @@ Official Website: https://dolphinscheduler.apache.org ## 如何使用docker镜像 #### 以 docker-compose 的方式启动dolphinscheduler(推荐) + ``` $ docker-compose -f ./docker/docker-swarm/docker-compose.yml up -d ``` diff --git a/docker/kubernetes/dolphinscheduler/README.md b/docker/kubernetes/dolphinscheduler/README.md index 07d4f5b0d8..2fc4aee9c3 100644 --- a/docker/kubernetes/dolphinscheduler/README.md +++ b/docker/kubernetes/dolphinscheduler/README.md @@ -7,8 +7,8 @@ This chart bootstraps a [DolphinScheduler](https://dolphinscheduler.apache.org) ## Prerequisites -- Helm 3.1.0+ -- Kubernetes 1.12+ +- [Helm](https://helm.sh/) 3.1.0+ +- [Kubernetes](https://kubernetes.io/) 1.12+ - PV provisioner support in the underlying infrastructure ## Installing the Chart @@ -22,10 +22,38 @@ $ helm repo add bitnami https://charts.bitnami.com/bitnami $ helm dependency update . $ helm install dolphinscheduler . ``` + +To install the chart with a namespace named `test`: + +```bash +$ helm install dolphinscheduler . -n test +``` + +> **Tip**: If a namespace named `test` is used, the option `-n test` needs to be added to the `helm` and `kubectl` command + These commands deploy DolphinScheduler on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. > **Tip**: List all releases using `helm list` +## Access DolphinScheduler UI + +If `ingress.enabled` in `values.yaml` is set to `true`, you just access `http://${ingress.host}/dolphinscheduler` in browser. + +> **Tip**: If there is a problem with ingress access, please contact the Kubernetes administrator and refer to the [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) + +Otherwise, you need to execute port-forward command like: + +```bash +$ kubectl port-forward --address 0.0.0.0 svc/dolphinscheduler-api 12345:12345 +$ kubectl port-forward --address 0.0.0.0 -n test svc/dolphinscheduler-api 12345:12345 # with test namespace +``` + +> **Tip**: If the error of `unable to do port forwarding: socat not found` appears, you need to install `socat` at first + +And then access the web: http://192.168.xx.xx:12345/dolphinscheduler + +The default username is `admin` and the default password is `dolphinscheduler123` + ## Uninstalling the Chart To uninstall/delete the `dolphinscheduler` deployment: @@ -34,7 +62,15 @@ To uninstall/delete the `dolphinscheduler` deployment: $ helm uninstall dolphinscheduler ``` -The command removes all the Kubernetes components associated with the chart and deletes the release. +The command removes all the Kubernetes components but PVC's associated with the chart and deletes the release. + +To delete the PVC's associated with `dolphinscheduler`: + +```bash +$ kubectl delete pvc -l app.kubernetes.io/instance=dolphinscheduler +``` + +> **Note**: Deleting the PVC's will delete all data as well. Please be cautious before doing it. ## Configuration @@ -82,9 +118,9 @@ The following tables lists the configurable parameters of the Dolphins Scheduler | `common.configmap.RESOURCE_STORAGE_TYPE` | Resource storage type: HDFS, S3, NONE | `HDFS` | | `common.configmap.RESOURCE_UPLOAD_PATH` | Resource store on HDFS/S3 path, please make sure the directory exists on hdfs and have read write permissions | `/dolphinscheduler` | | `common.configmap.FS_DEFAULT_FS` | Resource storage file system like `file:///`, `hdfs://mycluster:8020` or `s3a://dolphinscheduler` | `file:///` | -| `common.configmap.FS_S3A_ENDPOINT` | S3 endpoint when `common.configmap.RESOURCE_STORAGE_TYPE` is seted to `S3` | `s3.xxx.amazonaws.com` | -| `common.configmap.FS_S3A_ACCESS_KEY` | S3 access key when `common.configmap.RESOURCE_STORAGE_TYPE` is seted to `S3` | `xxxxxxx` | -| `common.configmap.FS_S3A_SECRET_KEY` | S3 secret key when `common.configmap.RESOURCE_STORAGE_TYPE` is seted to `S3` | `xxxxxxx` | +| `common.configmap.FS_S3A_ENDPOINT` | S3 endpoint when `common.configmap.RESOURCE_STORAGE_TYPE` is set to `S3` | `s3.xxx.amazonaws.com` | +| `common.configmap.FS_S3A_ACCESS_KEY` | S3 access key when `common.configmap.RESOURCE_STORAGE_TYPE` is set to `S3` | `xxxxxxx` | +| `common.configmap.FS_S3A_SECRET_KEY` | S3 secret key when `common.configmap.RESOURCE_STORAGE_TYPE` is set to `S3` | `xxxxxxx` | | `common.fsFileResourcePersistence.enabled` | Set `common.fsFileResourcePersistence.enabled` to `true` to mount a new file resource volume for `api` and `worker` | `false` | | `common.fsFileResourcePersistence.accessModes` | `PersistentVolumeClaim` Access Modes, must be `ReadWriteMany` | `[ReadWriteMany]` | | `common.fsFileResourcePersistence.storageClassName` | Resource Persistent Volume Storage Class, must support the access mode: ReadWriteMany | `-` |