SeaTunnel 2.3.4 Cluster in K8S

参考:seatunnel k8s运行zeta引擎(cluster-mode模式)_apache seatunnel zeta 启动-CSDN博客
以上参考使用的是2.3.3版本

下载2.3.4版本, 上dlcdn.apache.org下载 ,官网下载有问题
wget https://dlcdn.apache.org/seatunnel/2.3.4/apache-seatunnel-2.3.4-bin.tar.gz
解压

configmap配置,可考虑指定namespace
kubectl create configmap hazelcast-client  --from-file= config/hazelcast-client.yaml
kubectl create configmap hazelcast  --from-file=config/hazelcast.yaml
kubectl create configmap seatunnelmap  --from-file=config/seatunnel.yaml

使用Reloader实现更新configmap后自动重启pod

wget https://raw.githubusercontent.com/stakater/Reloader/master/deployments/kubernetes/reloader.yaml

修改namespace

%s/default/seatunnel/g

kubectl apply -f reloader.yaml

修改maven配置,使用私服下载
进入 .mvn/wrapper/maven-wrapper.properties
可以看到需要使用apache-maven-3.8.4-bin.zip
进入~/.m2/wrapper/dists/apache-maven-3.8.4-bin/52ccbt68d252mdldqsfsn03jlf/apache-maven-3.8.4/conf
修改setting.xml配置即可


下载connector,直接使用私服下载
bin/install-plugin.sh
connectors目录会下载相关的connectors jar包

连接mysql需要一个驱动,mysql 8.0需要对应的jar
plugins/jdbc/lib/mysql-connector-java-8.0.30.jar

把下载好的完成的目录打包,并准备上传至镜像文件
tar -cvf apache-seatunnel-2.3.4.tar apache-seatunnel-2.3.4


编辑 dockerfile

FROM flink:1.18
ENV SEATUNNEL_VERSION="2.3.4"
COPY ./apache-seatunnel-${SEATUNNEL_VERSION}.tar /opt/apache-seatunnel-${SEATUNNEL_VERSION}.tar
WORKDIR /opt
RUN tar -xvf apache-seatunnel-${SEATUNNEL_VERSION}.tar
RUN mv apache-seatunnel-${SEATUNNEL_VERSION} seatunnel
RUN rm -f /opt/apache-seatunnel-${SEATUNNEL_VERSION}.tar
WORKDIR /opt/seatunnel

docker build -t yourharbo/yourlib/seatunnel:2.3.4 -f dockerfile-seatunnel-2.3.4 .
docker push  yourharbo/yourlib/seatunnel:2.3.4

提前下载镜像前上传至私服

docker pull ghcr.io/stakater/reloader:v1.0.69


创建seatunnel-cluster.yml并执行
按上方参考链接文章中的步骤执行即可

  • 16
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值