https://www.bookstack.cn/read/dolphinscheduler-3.0.1-zh/4732249ba1facb06.md
helm
部署 dolphinscheduler
lifecycle:
postStart:
exec:
command: ["/bin/bash", "-c", "cd /etc/hadoop;cp core-site.xml hdfs-site.xml /opt/dolphinscheduler/conf;sed -i \"s/fs.defaultFS=.*$/fs.defaultFS=hdfs:\\/\\/hdfs-namenode-service:9000/g\" /opt/dolphinscheduler/conf/common.properties; sed -i \"s/hdfs.root.user=.*$/hdfs.root.user=root/g\" /opt/dolphinscheduler/conf/common.properties;"]
#### 挂载 hadoop 配置文件
volumeMounts:
- name: hadoop-config-volume
mountPath: /etc/hadoop
...
volumes:
- name: hadoop-config-volume
persistentVolumeClaim:
claimName: hadoop-config-pvc
添加以上内容至以下 yaml
[root@k8s-master-01 templates]# pwd
/opt/module/k8s/helm/dolphinscheduler/templates
[root@k8s-master-01 templates]# ll
total 116
...
deployment-dolphinscheduler-alert.yaml
-rw-r--r--. 1 root root 5715 Mar 3 14:32 deployment-dolphinscheduler-api.yaml
...
-rw-r--r--. 1 root root 6238 Mar 2 19:29 statefulset-dolphinscheduler-master.yaml
-rw-r--r--. 1 root root 8200 Mar 2 19:28 statefulset-dolphinscheduler-worker.yaml
...
注意:dolphinscheduler-api
也需要配置,不然可能存在资源未上报至HDFS
的情况