前面部署k8s
,都是为了dolphindcheduler
服务,dolphindcheduler
官网也提供了k8s
部署方式步骤,今天就跟着官网步骤走一遭,主要是通过helm
命令,至于上面的可视化工具Kuboard
也可以界面部署应用,这个后续再研究
Kubernetes
部署dolphindcheduler
跟着官网走,看着挺简单
安装比较简单,直接解压,移动到 /usr/local/bin/
目录
[root@renxiaozhao01 ~]#
[root@renxiaozhao01 ~]# tar xf helm-v3.12.3-linux-amd64.tar.gz
[root@renxiaozhao01 ~]#
[root@renxiaozhao01 ~]# mv linux-amd64/helm /usr/local/bin/
[root@renxiaozhao01 ~]# which helm
/usr/local/bin/helm
[root@renxiaozhao01 ~]#
常用命令(详见官网)
Charts
(指的是 Helm
的包管理器中可用的一组预先定义好的软件包集合)命令
helm search hub
:从 Artifact Hub 中查找并列出 helm charts。 Artifact Hub中存放了大量不同的仓库。helm search repo
:从你添加(使用 helm repo add)到本地 helm 客户端中的仓库中进行查找。该命令基于本地数据进行搜索,无需连接互联网。[root@renxiaozhao01 ~]# helm search repo mysql
NAME CHART VERSION APP VERSION DESCRIPTION
bitnami/mysql 9.12.2 8.0.34 MySQL is a fast, reliable, scalable, and easy t...
bitnami/phpmyadmin 12.1.1 5.2.1 phpMyAdmin is a free software tool written in P...
bitnami/mariadb 13.1.3 11.0.3 MariaDB is an open source, community-developed ...
bitnami/mariadb-galera 9.1.2 11.0.3 MariaDB Galera is a multi-primary database clus...
[root@renxiaozhao01 ~]#
[root@renxiaozhao01 ~]# helm search hub mysql
URL CHART VERSION APP VERSION DESCRIPTION
https://artifacthub.io/packages/helm/ygqygq2/mysql 9.5.0 8.0.32 MySQL is a fast, reliable, scalable, and easy t...
https://artifacthub.io/packages/helm/bitnami/mysql 9.12.2 8.0.34 MySQL is a fast, reliable, scalable, and easy t...
https://artifacthub.io/packages/helm/kubesphere... 1.0.2 5.7.33 High Availability MySQL Cluster, Open Source.
https://artifacthub.io/packages/helm/stakater/m... 1.0.6 mysql chart that runs on kubernetes
https://artifacthub.io/packages/helm/kvalitetsi... 9.10.4 8.0.33 MySQL is a fast, reliable, scalable, and easy t...
https://artifacthub.io/packages/helm/saber/mysql 8.8.21 8.0.27 Chart to create a Highly available MySQL cluster
https://artifacthub.io/packages/helm/kubegems/m... 8.9.6 8.0.29 MySQL is a fast, reliable, scalable, and easy t...
https://artifacthub.io/packages/helm/mysql/mysql 2.1.3 8.0.26 deploy mysql standalone or group-replication He...
https://artifacthub.io/packages/helm/bitnami-ak... 9.4.4 8.0.31 MySQL is a fast, reliable, scalable, and easy t...
https://artifacthub.io/packages/helm/cloudnativ... 5.0.1 8.0.16 Chart to create a Highly available MySQL cluster
https://artifacthub.io/packages/helm/choerodon/... 8.5.1 8.5.1 Chart to create a Highly available MySQL cluster
https://artifacthub.io/packages/helm/wso2/mysql 1.6.9 5.7.30 Fast, reliable, scalable, and easy to use open-...
https://artifacthub.io/packages/helm/kubesphere... 1.6.8 5.7.31 Fast, reliable, scalable, and easy to use open-...
https://artifacthub.io/packages/helm/ot-contain... 0.1.0 1.16.0 A Helm chart for Kubernetes to deploy mysql.
https://artifacthub.io/packages/helm/gengxianku... 0.2.0 1.16.0 MySQL is an open-source relational database man...
https://artifacthub.io/packages/helm/helm-chart... 1.0.0 5.7.26 Chart to create a Highly available MySQL clust
helm install
安装命令helm upgrade
升级 和 helm rollback
回滚按照官方步骤依次执行,执行到update
时失败
[root@renxiaozhao01 ~]# tar xf apache-dolphinscheduler-3.1.8-src.tar.gz
[root@renxiaozhao01 ~]# cd apache-dolphinscheduler-3.1.8-src/deploy/kubernetes/dolphinscheduler/
[root@renxiaozhao01 dolphinscheduler]#
[root@renxiaozhao01 dolphinscheduler]# ll
总用量 32
-rw-r--r-- 1 root root 2905 2月 18 2022 Chart.yaml
drwxr-xr-x 3 root root 20 2月 18 2022 resources
drwxr-xr-x 2 root root 4096 9月 14 20:27 templates
-rw-r--r-- 1 root root 21527 2月 18 2022 values.yaml
[root@renxiaozhao01 dolphinscheduler]#
[root@renxiaozhao01 dolphinscheduler]# helm repo add bitnami https://charts.bitnami.com/bitnami
"bitnami" has been added to your repositories
[root@renxiaozhao01 dolphinscheduler]#
[root@renxiaozhao01 dolphinscheduler]# helm dependency update .
Getting updates for unmanaged Helm repositories...
...Unable to get an update from the "https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami" chart repository:
Get "https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/index.yaml": read tcp 192.168.11.128:45740->185.199.109.133:443: read: connection reset by peer
^C
[root@renxiaozhao01 dolphinscheduler]#
尝试更换地址(把Chart.yaml
文件中默认的repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
修改为repository: https://charts.bitnami.com/bitnami
),再次验证,更新成功
Chart.yaml
中verison
也要修改,要不然找不到原来默认的版本,可以通过上面helm
命令查看现有版本
helm search repo postgresql
执行安装命令报错(之前部署k8s时,单独建了部署用户,应该使用该部署用户执行,未指定工作空间的情况下,默认default
)
[root@renxiaozhao01 dolphinscheduler]# helm install dolphinscheduler-3.1.8 . --set image.tag=first_k8s_install
Error: INSTALLATION FAILED: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp 127.0.0.1:8080: connect: connection refused
[root@renxiaozhao01 dolphinscheduler]# ll
总用量 40
切换到k8s部署用户,再次执行,报各种没权限错(一开始就要就在k8s部署用户下面操作,切记!切记!切记!),最终把相关目录移到部署用户下面,并且赋予部署用户权限,最终安装好像成功了
[root@renxiaozhao01 ~]# mv apache-dolphinscheduler-3.1.8-src /home/kubernetes/
[root@renxiaozhao01 ~]# chown -R kubernetes:kubernetes /home/kubernetes/apache-dolphinscheduler-3.1.8-src
[root@renxiaozhao01 ~]#
helm list
可以查看到状态没问题[kubernetes@renxiaozhao01 dolphinscheduler]$ helm uninstall dolphinscheduler
release "dolphinscheduler" uninstalled
[kubernetes@renxiaozhao01 dolphinscheduler]$ helm uninstall dolphinscheduler-3.1.8
release "dolphinscheduler-3.1.8" uninstalled
[kubernetes@renxiaozhao01 dolphinscheduler]$ helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
[kubernetes@renxiaozhao01 dolphinscheduler]$
[kubernetes@renxiaozhao01 dolphinscheduler]$ helm install dolphinscheduler . --set image.tag=3.1.8
镜像还是下载不下来…
问题就是镜像下载失败导致的,可能和之前设置镜像加速地址有关系,后续再战吧,从k8s安装开始,遇到的大部分问题都是地址下载问题导致的