Skip to content

Instantly share code, notes, and snippets.

@jleach
Created June 11, 2019 04:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jleach/8cbae6140eb128eb573b8a7528eb60d3 to your computer and use it in GitHub Desktop.
Save jleach/8cbae6140eb128eb573b8a7528eb60d3 to your computer and use it in GitHub Desktop.
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