Edge Routing and HTTPS for Everyone

Traefik in Action!

Traefik's Logo

QRCode to this presentation

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"

Whoami

Michael Matur

michael

Containous

  • We Believe in Open Source

  • We Deliver Traefik

  • Commercial Support for Traefik

  • 22 people, 80% 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

Traefik Project

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

In Practice

Traefik in Practise

Show Me the Configuration!

Keep it Simple

  • 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

HTTPS for Everyone with Let’s Encrypt

Lets Encrypt HTTP Challenge
  • TLS, DNS and HTTP challenges supported

Demo

demo

Traefik with ⎈

Traefik with Kubernetes Diagram

Did you say YAML?

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

The Herd

herd of goats
You came to the wrong neighbour

Traefik comes in Herd

cluster traefikee

As Simple As Traefik

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

Free Trial

Revamped Documentation

background

Clarified Concepts

traefik v2 concepts

Expressive Routing Rule Syntax

traefik v2 rules

# 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')

Middlewares

traefik v2 middlewares
traefik v2 tcp

Quick Glance

[entrypoints]
    [entrypoints.web-secure]
      address = ":443"
[http]
   [http.routers.to-service-1]
      rule = "Host(`demo.containous.cloud`)"
      service = "service-1"
      [http.routers.to-service-1.tls] # terminates the tls connection at HTTP
[tcp]
   [tcp.routers.to-service-2]
      rule = "HostSNI(`demo.containous.cloud`)"
      service = "service-2"
      [tcp.routers.to-service-2.tls] # terminates the tls connection at TCP
[tcp.routers.to-service-3]
      rule = "HostSNI(`demo.containous.cloud`)"
      service = "service-3"
      [tcp.routers.to-service-3.tls]
         passthrough = true # sends encrypted data "as is" to service-3

And so Much More…​

  • Learn more on the blog post

  • Call for contribution: Grab it, Try it, and give us your feedback!

We have

stickers!

We are hiring!

Containous
docker run -it containous/jobs

Thank you!

QRCode to this presentation