Files
lab-k8s/traefik/deployment.yml
Eason(G Ray) 14df1fb03b init
2024-06-28 13:43:34 +08:00

49 lines
1.1 KiB
YAML

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"