1 引言
官方链接:https://docs.traefik.io/
Traefik是开源的 边缘路由器,使发布服务变得有趣而轻松。它代表您的系统接收请求,并找出负责处理这些请求的组件。
Traefik原生兼容所有主要的集群技术,例如Kubernetes,Docker,Docker Swarm,AWS,Mesos,Marathon等
2 helm2安装traefik
https://hub.helm.sh/charts?q=traefik
https://docs.traefik.io/getting-started/install-traefik/
git clone https://github.com/containous/traefik-helm-chart
helm install ./traefik-helm-chart
3 使用ingress yaml来暴露端口
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: jenkins-ingressroute-tls
spec:
entryPoints:
- websecure
routes:
- match: Host(`jenkins.domain.com`)
kind: Rule
services:
- name: jenkins
port: 8080
tls:
secretName: your-tls