Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Traefik as a Daemon Set on a DigitalOcean k8s cluster
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
annotations:
labels:
k8s-app: traefik-ingress-controller
name: traefik-ingress-controller
namespace: kube-system
spec:
selector:
matchLabels:
k8s-app: traefik-ingress-controller
template:
metadata:
labels:
k8s-app: traefik-ingress-controller
spec:
containers:
- args:
- --api
- --kubernetes
- --configfile=/config/traefik.toml
image: traefik
livenessProbe:
httpGet:
path: /ping
port: 80
initialDelaySeconds: 60
periodSeconds: 3
readinessProbe:
httpGet:
path: /ping
port: 80
initialDelaySeconds: 3
periodSeconds: 3
name: traefik
ports:
- containerPort: 80
name: http
protocol: TCP
- containerPort: 443
name: https
protocol: TCP
- containerPort: 8080
name: admin
protocol: TCP
volumeMounts:
- mountPath: "/config"
name: config
# - mountPath: "/acme"
# name: acme
resources:
limits:
cpu: 50m
memory: 200Mi
requests:
cpu: 20m
memory: 100Mi
serviceAccountName: traefik-ingress-controller
terminationGracePeriodSeconds: 60
volumes:
- name: config
configMap:
name: traefik-conf
# - name: acme
# persistentVolumeClaim:
# claimName: traefik-data
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment