./traefik bug
Presentation available at https://geraldcroes.github.io/devconf-us-2018-boston
Senior Developer @ Containous
Former Chief Enterprise Architect for an Insurance Company
Passionate about Taekwondo …
… since people were making fun of my former love for PHP
We Believe in Open Source
We Deliver Træfik
Commercial Support for Træfik
12 people, 90% technical experts
We Are Hiring!
The Cloud Native Edge Router
MIT License
16,800+ ⭐
160M+ ⬇️
1800+ LGTM
300+ 👷
./traefik bug
Autofills the issue template (environment, configuration files, …)
Why, Mr Anderson?
That You Don’t Have to Write This Configuration File?
We have Helm support - https://helm.sh/
# Kubernetes Ready
kubectl get all
...
# Install Traefik into your Kubernetes cluster
helm install stable/traefik
# Start your service in Kubernetes
kubectl apply -f ./myservice.yml
helm install stable/traefik
--set dashboard.enabled=true,dashboard.domain=dashboard.localhost
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: whoami-deployment
spec:
replicas: 1
selector:
matchLabels:
app: whoami
template:
metadata:
labels:
app: whoami
spec:
containers:
- name: whoami-container
image: containous/whoami
---
apiVersion: v1
kind: Service
metadata:
name: whoami-service
spec:
ports:
- name: http
targetPort: 80
port: 80
selector:
app: whoami
kubectl apply -f whoami-service.yml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: whoami-ingress
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: whoami.localhost
http:
paths:
- path: /
backend:
serviceName: whoami-service
servicePort: http
kubectl apply -f whoami-service.yml
More Routes?
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: whoareyou-deployment
spec:
replicas: 2
selector:
matchLabels:
app: whoareyou
template:
metadata:
labels:
app: whoareyou
spec:
containers:
- name: whoareyou-container
image: containous/whoami
---
apiVersion: v1
kind: Service
metadata:
name: whoareyou-service
spec:
ports:
- name: http
targetPort: 80
port: 80
selector:
app: whoareyou
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: whoareyou-ingress
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: whoareyou.localhost
http:
paths:
- path: /
backend:
serviceName: whoareyou-service
servicePort: http
kubectl apply -f whoareyou.yml
[acme]
email = "me@mydomain.me"
storage = "/acme/acme.json"
entryPoint = "https"
OnHostRule = true
[acme.httpChallenge]
entryPoint="http"
htpasswd -c authfile myuser
kubectl create secret generic mysecretplace --from-file authfile
Then add the following annotations to your ingress object:
annotations:
kubernetes.io/ingress.class: traefik
ingress.kubernetes.io/auth-type: "basic"
ingress.kubernetes.io/auth-secret: "mysecret"
Docker / Swarm
Mesos / Marathon
Consul / Consul Catalog
Eureka
Rate Limiting
Health Checks
Circuit Breakers
Cluster Mode
GRPC
Tls Certificates
Kubernetes Secrets
Auth Forward
Custom Headers
Custom Error Pages
Redirects
Proxy Protocol
HSTS
Websockets
ZIPKIN
JAEGER
PROMETHEUS