K8s部署网页版kettle

K8s部署网页版kettle


  • 项目介绍

  • 项目背景

  • 部署方案


项目介绍

Kettle,又称为Pentaho Data Integration(PDI),是一个开源的ETL工具,由Pentaho公司开发和维护。ETL代表提取(Extract)、转换(Transform)和加载(Load),是数据仓库和数据集成领域的关键概念之一。

项目地址:https://github.com/HiromuHota/pentaho-kettle

项目背景

1、用于线上调试脚本,文件可保存至服务器节点

2、试水traefik代替ingress-nginx的偶然产物

部署环境:现有k3s集群,双节点

K8s部署网页版kettle
image-20240211163343982

部署方案

1、创建以下三个yaml文件

webspoon-deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
name: webspoon
namespace: dev
spec:
replicas: 1
selector:
matchLabels:
app: webspoon
template:
metadata:
labels:
app: webspoon
spec:
nodeSelector: # 添加节点选择器
kubernetes.io/hostname: k3s-master
volumes:
- name: webspoon-hostpath-volume
hostPath:
path: /nodepath/webspoon #确保node节点有这个目录,不然新建pod报错
type: Directory
containers:
- name: webspoon
image: hiromuhota/webspoon
ports:
- containerPort: 8080
volumeMounts:
- name: webspoon-hostpath-volume
mountPath: /opt/kettle #容器内挂载的目录

webspoon-service.yaml

apiVersion: v1
kind: Service
metadata:
name: webspoon-service
namespace: dev
spec:
selector:
app: webspoon
ports:
- port: 8080
targetPort: 8080

webspoon-service.yaml

apiVersion: v1
kind: Service
metadata:
name: webspoon-service
namespace: dev
spec:
selector:
app: webspoon
ports:
- port: 8080
targetPort: 8080
[root@k3s-master webspoon]# cat webspoon-ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: webspoon-ingress
namespace: dev
annotations:
#traefik.ingress.kubernetes.io/router.middlewares: dev-basic-auth@kubernetescrd
spec:
tls:
- hosts:
- gengbo.top
secretName: gengbo.top-tls-secret
rules:
- host: gengbo.top
http:
paths:
- path: /spoon
pathType: Prefix
backend:
service:
name: webspoon-service
port:
number: 8080


2、部署

kubectl apply -f webspoon-deployment.yaml
kubectl apply -f webspoon-service.yaml
kubectl apply -f webspoon-ingress.yaml

增加一个secret创建,否则无法使用https访问(需要提前准备好下面引用的两个证书文件)

kubectl create secret tls gengbo.top-tls-secret --cert=/root/ssl/gengbo.top.pem --key=/root/ssl/gengbo.top.key -n dev


3、验证

访问https://gengbo.top/spoon

K8s部署网页版kettle
image-20240211164353936


原文始发于微信公众号(给爷整笑辣):K8s部署网页版kettle

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

文章由极客之家整理,本文链接:https://www.bmabk.com/index.php/post/206906.html

(0)
小半的头像小半

相关推荐

发表回复

登录后才能评论
极客之家——专业性很强的中文编程技术网站,欢迎收藏到浏览器,订阅我们!