Traefik en action !
Browse the slides: Use the arrows
Change chapter: Left/Right arrows
Next or previous slide: Top and bottom arrows
Overview of the slides: keyboard’s shortcut "o"
Speaker mode (and notes): keyboard’s shortcut "s"
Damien DUPORTAL:
Træfik's Developer 🥑 Advocate @ Containous
We Believe in Open Source
We Deliver Traefik
Commercial Support for Traefik
20 people, 90% tech
Why, Mr Anderson?
That You Don’t Have to Write This Configuration File…?
MIT License
Written in Go
21,000+ ⭐
600M+ ⬇️
350+ 👷
With 🐳:
entrypoint:
image: traefik:v1.7
command:
- "--docker"
- "--docker.domain=mycompany.org"
- "--acme.email=ssl-admin@mycompany.org"
- "--acme.httpChallenge.entryPoint=http"
# Or you could use a TOML file with "--configFile=/etc/traefik/traefik.toml
volumes:
- /var/run/docker.sock:/var/run/docker.sock
TLS, DNS and HTTP challenges supported
# https://www.mycompany.org -> http://webserver:80/
webserver:
image: nginx:alpine
labels:
- "traefik.frontend.rule=Host:www.mycompany.org"
# https://mycompany.org/jenkins -> http://jenkins:8080/jenkins
jenkins:
image: jenkins/jenkins:lts
labels:
- "traefik.frontend.rule=PathPrefix:/jenkins"
- "traefik.port=8080" # Because 50000 is also exposed
environment:
- JENKINS_OPTS=--prefix=/jenkins
# https://mycompany.org/gitserver -> http://gitserver:3000/
gitserver:
image: gitea/gitea:1.5
labels:
- "traefik.frontend.rule=PathPrefixStrip:/gitserver"
- "traefik.port=3000" # Because 22 is also exposed
# https://mycompany.org/webterminal -> http://webterminal:7681/
webterminal:
image: tsl0922/ttyd
labels:
- "traefik.frontend.rule=PathPrefixStrip:/webterminal"
expose:
- "7681"
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
# kubernetes.io/ingress.class: 'nginx'
kubernetes.io/ingress.class: 'traefik'
spec:
rules:
- host: mycompany.org
http:
paths:
- path: "/whoami"
backend:
serviceName: whoami
servicePort: 80
Install it:
# Cluster Installation
traefikeectl install \
--licensekey="SuperSecretLicence" \
--dashboard \
--kubernetes # Or --swarm
Configure it:
# Routing Configuration, same as Traefik's
traefikeectl deploy \
--acme.email=ssl-admin@mycompany.org
--acme.tlsChallenge
...
What About Open Source?
# Send both requests to backend service:
# https://api.mycompany.com/v2
# https://api-v2.mycompany.com
rule=(Host('api.mycompany.com') && PathPrefix('/v2')) || Host('api-v2.mycompany.com')
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
spec:
entrypoints:
- web
- web-secure
routes:
- match: Host(`traefik.io`) && PathPrefix(`/foo`)
kind: Rule
services:
- name: whoami1
port: 80
strategy: RoundRobin
middlewares:
- name: stripprefix
- match: Host(`containo.us`) && Method(`POST`)
kind: Rule
services:
- name: whoami2
port: 80
tls:
secretName: supersecret
New WebUI
Newmetrics
UDP
YAML
TLS stores & options
Canary
stickers!