2020-12-15 15:40:05 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: traefik-controller
|
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
2021-11-09 10:34:06 +00:00
|
|
|
kind: Deployment
|
2020-12-15 15:40:05 +00:00
|
|
|
metadata:
|
|
|
|
name: traefik
|
|
|
|
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: traefik-lb
|
2021-11-09 10:34:06 +00:00
|
|
|
|
2020-12-15 15:40:05 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: traefik-lb
|
2021-11-09 10:34:06 +00:00
|
|
|
|
2020-12-15 15:40:05 +00:00
|
|
|
spec:
|
|
|
|
serviceAccountName: traefik-controller
|
|
|
|
containers:
|
|
|
|
- name: traefik
|
2022-12-05 15:58:04 +00:00
|
|
|
image: traefik:v3.0
|
2020-12-15 15:40:05 +00:00
|
|
|
args:
|
2024-04-22 15:24:04 +00:00
|
|
|
- --entryPoints.web.address=:80
|
|
|
|
- --entryPoints.websecure.address=:443
|
2020-12-15 15:40:05 +00:00
|
|
|
- --experimental.kubernetesgateway
|
|
|
|
- --providers.kubernetesgateway
|
2021-11-09 10:34:06 +00:00
|
|
|
|
2020-12-15 15:40:05 +00:00
|
|
|
ports:
|
|
|
|
- name: web
|
|
|
|
containerPort: 80
|
2021-11-09 10:34:06 +00:00
|
|
|
|
2020-12-15 15:40:05 +00:00
|
|
|
- name: websecure
|
|
|
|
containerPort: 443
|
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: traefik
|
2021-11-09 10:34:06 +00:00
|
|
|
|
2020-12-15 15:40:05 +00:00
|
|
|
spec:
|
2021-11-09 10:34:06 +00:00
|
|
|
type: LoadBalancer
|
2020-12-15 15:40:05 +00:00
|
|
|
selector:
|
|
|
|
app: traefik-lb
|
2021-11-09 10:34:06 +00:00
|
|
|
|
2020-12-15 15:40:05 +00:00
|
|
|
ports:
|
|
|
|
- protocol: TCP
|
|
|
|
port: 80
|
|
|
|
targetPort: web
|
|
|
|
name: web
|
2021-11-09 10:34:06 +00:00
|
|
|
|
2020-12-15 15:40:05 +00:00
|
|
|
- protocol: TCP
|
|
|
|
port: 443
|
|
|
|
targetPort: websecure
|
|
|
|
name: websecure
|