DevOps Enterprise Transformation: Easy Routing for Your Applications

 Containou's Logo

Whoami

damien

Containous

  • We Believe in Open Source

  • We Deliver Traefik and Traefik Enterprise Edition

  • Commercial Support

  • 30 people distributed, 90% tech

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’s My 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

Deployment

  • Single Binary

  • Docker Image

  • Runs nearly everywhere, VM’s, Cloud, Hybrid…​

Traefik 2.0 Quick Overview

  • Revamped Documentation

  • Clarified Concepts

  • Expressive Routing Rule Syntax

  • Middlewares

  • TCP Support

  • Canary / Mirroring

  • And so Much More…​

Learn more on the blog post

Traefik (v2.0) Core Concepts

Bored Minion

Traefik…​

…​sits at the edge of your infra, and dynamically discovers services:

Traefik Automatic Config

Architecture (v2.0) at a Glance

Traefik Architecture At A Glance

Static & Dynamic Configuration

Static and Dynamic Configuration

Show Me the Configuration!

Example With 🐳

version: '3'

services:
  reverse-proxy:
    image: traefik:v2.0
    command: --providers.docker.endpoint="tcp://proxy-docker.svc.local:2376"
    ports:
      - "80:80"

  corporate-webapp:
    image: company/corporate-webapp:1.2.3
    labels:
      - "traefik.http.routers.webapp.rule=Host(`company.com`)"

  admin-webapp:
    image: company/admin-webapp:15.2.2
    labels:
      - "traefik.http.routers.admin-webapp.rule=Host(`company.com`) && PathPrefix(`/admin`)"
      - "traefik.http.routers.admin-webapp.service=admin-svc"
      - "traefik.http.services.admin-svc.LoadBalancer.server.Port=9999"

Traefik With ⎈

Traefik with Kubernetes Diagram

Ingress Example with ⎈

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: corporate-webapp
  annotations:
    kubernetes.io/ingress.class: 'traefik'
spec:
  rules:
  - host: localhost
    http:
      paths:
      - backend:
          serviceName: corporate-webapp
          servicePort: 80

But…​

traefik ingress annotations
nginx ingress annotations

⎈ CRD - Custom Resources Definition

# File "webapp.yaml"
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: simpleingressroute
spec:
  entryPoints:
    - web
  routes:
  - match: Host(`localhost`) && PathPrefix(`/whoami`)
    kind: Rule
    services:
    - name: webapp
      port: 80
$ kubectl apply -f webapp.yaml
$ kubectl get ingressroute

⎈ & TCP (with CRD)

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
  name: ingressroutetcpmongo.crd
spec:
  entryPoints:
    - mongotcp
  routes:
  - match: HostSNI(`mongo-prod`)
    services:
    - name: mongo-prod
      port: 27017

Demo 1 with 🐳

demo

Demo 2 with ⎈

Menu:

  1. Install Traefik v2 in Kubernetes cluster

  2. Deploy and expose an HTTP application

  3. Deploy and expose a TCP application

Install Traefik in Kubernetes

  1. 🛠 Custom Resource Definitions

  2. ‍👮 Configure RBAC

    • To allow watching the Kubernetes API

  3. 📦 Install Traefik as a Deployment

  4. 🚪 Expose and 📣 publish Traefik with the right Service type

    • LoadBalancer, NodePort?

  5. ✅ Configure Traefik and its features

Example: HTTP application

  1. 📦 Install the web application as a Deployment

  2. 🚪 Expose the web application with a Service of type ClusterIP

    • Internal access only

  3. 📣 Publish the web application with an IngressRoute

Example: TCP application

Example with MongoDB:

  1. 📦 Install MongoDB as a Deployment

  2. 🚪 Expose MongoDB with a Service of type ClusterIP

    • Internal access only

  3. 📣 Publish MongoDB with an IngressRouteTCP

What’s Next?

  • KV Store

  • UDP

  • Canary and Mirroring With K8s CRD

  • And More…​

Where to Start?

We Also Missed Talking About …​

word cloud

Traefik Enterprise Edition

cluster traefikee

TraefikEE Architecture

traefikee architecture gray bg

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

Demo of TraefikEE

demo

Free Trial

East / West Traefik

compass

Say Hello to Maesh

maesh

What is Maesh?

Maesh is a lightweight, easy to configure, and non-invasive service mesh that allows visibility and management of the traffic flows inside any Kubernetes cluster.

Maesh Architecture

before maesh graphic
after maesh graphic

More on Maesh

  • Built on top of Traefik,

  • SMI (Service Mesh Interface specification) compliant,

  • Opt-in by default.

That’s All Folks!

Thank you!

QRCode to this presentation