Traefik

A Scalable and Highly Available Edge Router

Traefik's Logo
QRCode to this presentation

Whoami

damien

How to use these slides?

  • 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"

Containous

  • https://containo.us

  • We Believe in Open Source

  • We Deliver Traefik

  • Commercial Support for Traefik

  • 12 people, 90% technical experts

Containous Logo

Why Traefik?

Why, Mr Anderson?

Why, Mr Anderson?

Evolution of Software Design

Evolution of Software Design

The Premise of Microservices…​

Asterix - Premise

…​and What Happens

Asterix - Fighting

Where is the Service?

Where os Charlie?

Tools of the Trade

docker
rancher os
docker swarm
kubernetes
marathon
ec2
mesos
dynamodb
ecs
service fabric
consul
netflix oss
etcd
zookeeper
yaml

What If I Told You?

What If I Told You

That You Don’t Have to Write This Configuration File…​?

Here Comes Traefik!

Traefik's Architecture

The Project

Traefik's Logo

Traefik Project

I’ve Found A Bug!

./traefik bug

Autofills the issue template (environment, configuration files, …​)

Traefik Core Concepts

Bored Minion

Remember the Diagram?

Traefik's Architecture

Let’s Simplify

Traefik's Simplified Architecture

Providers

Traefik's Simplified Architecture

Entrypoints

Traefik's Entrypoints

Backends

Traefik's Backends

Frontends

Traefik's Frontends

At a Glance

Traefik Architecture At A Glance

In Practice

Traefik in Practise

A Glimpse on Traefik’s Features

Keep It Simple

Show me the code!

  • With Docker:

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

HTTPS for Everyone with Let’s Encrypt

Lets Encrypt HTTP Challenge
Lets Encrypt DNS Challenge

With Docker: Simple backend

# https://www.mycompany.org
webserver:
    image: nginx:alpine
    labels:
      - "traefik.frontend.rule=Host:www.mycompany.org"

With Docker: Websockets

# https://mycompany.org/webterminal
webterminal:
    image: tsl0922/ttyd
    labels:
      - "traefik.frontend.rule=PathPrefixStrip:/webterminal"
    expose:
      - "7681"

With Docker: Context

# http://mycompany.org/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

With Docker: Rewrites

# http://mycompany.org/gitserver
gitserver:
    image: gitea/gitea:1.5
    labels:
      - "traefik.frontend.rule=PathPrefixStrip:/gitserver"
      - "traefik.port=3000" # Because 22 is also exposed

Traefik with Kubernetes

Traefik with Kubernetes Diagram

With Kubernetes Too!

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

We Missed Talking About …​

word cloud

Did you Say "High Availability"?

An Highly-Available Traefik

verysecretproject high availability

A Safe Traefik

verysecretproject safety

A Scalable Traefik

verysecretproject scalability

Teaser

Traefik with Kubernetes Full Diagram

Very Secret Project

Stay Tuned