This commit is contained in:
Eason(G Ray)
2024-06-28 13:43:34 +08:00
commit 14df1fb03b
11 changed files with 379 additions and 0 deletions

49
traefik/deployment.yml Normal file
View File

@ -0,0 +1,49 @@
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: traefik
labels:
app: traefik
spec:
selector:
matchLabels:
name: traefik
template:
metadata:
labels:
k8s-app: traefik
name: traefik
spec:
serviceAccountName: traefik-account
terminationGracePeriodSeconds: 60
containers:
- image: traefik:v3.0
name: traefik
ports:
- name: web
containerPort: 80
hostPort: 80
- name: dashboard
containerPort: 8080
# hostPort: 8080
volumeMounts:
- name: config
mountPath: "/config"
readOnly: true
securityContext:
capabilities:
drop:
- ALL
add:
- NET_BIND_SERVICE
args:
- --api.insecure
# - --providers.kubernetesingress
- --configFile=/config/traefik.yaml
volumes:
- name: config
configMap:
name: traefik
items:
- key: "config"
path: "traefik.yaml"