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-06-13 15:26:12 +00:00
|
|
|
image: traefik:v2.8
|
2020-12-15 15:40:05 +00:00
|
|
|
args:
|
|
|
|
- --entrypoints.web.address=:80
|
|
|
|
- --entrypoints.websecure.address=:443
|
|
|
|
- --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
|