SlideShare a Scribd company logo
TRAEFIK 2.X
JAKUB HAJEK
MAY, 7TH, 2020
WHAT HAS CANARY DEPLOYMENT GOT TO DO WITH SCRAMBLED EGGS?
▸ I am the owner and technical consultant (SRE)
▸ I work for Cometari
▸ I’ve been system admin since 1998
▸ Cometari is a solutions company implementing DevOps
culture and providing consultancy, workshops and software
services.
▸ Our expertise are DevOps, Elastic Stack log analysis
INTRODUCTION - JAKUB HAJEK
▸ SRE & Co - founder 56k.cloud
▸ Background containers, Cloud & engineering
▸ Cloud Architect for large deployments
▸ Passionate about DevOps & Monitoring and of course Mountain
Biking
▸ Host of TheByte.io Podcast
▸ Docker Captain
▸ Traefik Ambassador
INTRODUCTION - BRIAN CHRISTNER
▸ Cloud Development Manager @Done
▸ Software Section Lead, writer and speaker @msHOWTO
▸ An active member of Cloud Family
▸ Passionate about Software Development, Cloud and DevOps
▸ Mountain Biking
▸ Traefik Ambassador
INTRODUCTION - MERT YETER
The aim of this meetup is to present what the key features
delivered with Traefik 2.x are
TRAEFIK
ENTRYPOINT ROUTER SERVICE
MIDDLEWARE 1 MIDDLEWARE 2 MIDDLEWARE 3
Request Calls to backend servers
WHAT IS IT TRAEFIK?
TRAEFIK 2.X KEY FEATURES
▸ ROUTER= frontend, SERVICE=backend, MIDDLEWARE=rules
▸ TCP / UDP / GRPC support
▸ Kubernetes CRD
▸ Fully customisable routes via middleware, which can be reused on many routers
▸ YAML, TOML is still good
▸ A new dashboard with web UI
▸ Canary deployment with Service Load balancer
▸ Network traffic Mirroring with Service Load balancer
▸ Session Stickiness
▸ Consul catalog
ENTRYPOINTS :80, :443
ROUTERS
PROVIDER 1
Traefik configuration introduction
PROVIDER
CONNECTION
INFORMATION
SERVICES
MIDDLEWARES
CERTIFICATES
PROVIDER 2
DYNAMIC (WHILE RUNNING)STATIC (STARTUP TIME)
KUBERNETES CRD
KUBERNETES CRD AND AVAILABLE CUSTOM RESOURCES
▸ Ingressroute - HTTP routing - http router
▸ Middleware - tweaks the HTTP before they are sent to a
service - HTTP Middleware
▸ TraefikService - abstraction for HTTP LB/mirroring
▸ IngressRouteTCP - TCP routing - TCP router
▸ TLSOptions - TLS connection parameters
https://docs.traefik.io/routing/providers/kubernetes-crd/
CANARY DEPLOYMENT AND
TRAFFIC MIRRORING
Traefik 2.x features - canary deployment with Traefik and K3S
CANARY DEPLOYMENT
▸ Deployment vs Release
▸ Instead of switching to new version in one step, we use a phased
approach
▸ We deploy a new app in a small part of the production
infrastructure
▸ Only a few users (1%) are routed to the newest version (Release)
▸ With no errors reported, the new version can be released to the
rest of the infrastructure.
CANARY
VERSION 2
VERSION 1
https://service
Canary deployment with Service Load balancers
1% of live traffic, a few users
Majority of users
https://github.com/containous/traefik/issues/1164
CANARY VERSION 2
https://service
Canary deployment with Service Load balancers
VERSION 2VERSION 2VERSION 2
MIRRORING OR LIVE TRAFFIC SHADOW
▸ Understand difference between Deployment vs Release
▸ Deployment brings new code to the production,
no production traffic yet!
▸ Run smoke, integration tests to make sure that new
deployment has no impact to your users
▸ Release brings live traffic to a deployment.
▸ We can shadow live traffic to the new deployment and
reduce the risk of failure.
MIRRORING
VERSION 2
VERSION 1
https://service
Mirroring with Service Load Balancer
20%
https://github.com/containous/traefik/issues/2989
DEMO ENVIRONMENT
DEMO ENVIRONMENT IN DETAILS
▸ K3S cluster consisting of 3 nodes
▸ SSL certs issued by Lets Encrypt
▸ FQDN domains:
▸ https://a.labs.cometari.eu
▸ https://c.labs.cometari.eu
▸ DNS Round Robin: Route 53 with its implemented health
checks
K3S CLUSTER IN 2 COMMANDS
▸ MASTER:
▸ curl -sfL https://get.k3s.io |
INSTALL_K3S_EXEC="server --no-deploy traefik --
node-name node1" sh -
▸ WORKERS:
▸ curl -sfL https://get.k3s.io | K3S_URL=https://master-
node.com:6443 K3S_TOKEN=SECRET_TOKEN
INSTALL_K3S_EXEC=“agent --node-name node2" sh -
Talk is cheap, show me the code!
DEMO TIME
DEMO SCENARIOS
▸ Web UI to see how services are deployed
▸ Example of Canary deployment
▸ Example of Mirroring configuration
A FEW BENEFITS OF CANARY DEPLOYMENT
▸ Traefik provides flexible way to proceed with canary (K8S, K3S,
Swarm)
▸ Reduce time to market
▸ Canary deployment allows you validate your application in real
production environment
▸ Rolling out releases
▸ No need to maintain a lot of staging / testing environments
SOURCE CODE OF CONFIGURATION FILES
▸ https://github.com/jakubhajek/traefik-kubernetescrd
THANK YOU
@_JAKUBHAJEK
JAKUB.HAJEK@COMETARI.COM
“I strongly believe that implementing DevOps culture, across
the entire organisation, should provide measurable value and
solve the real issue rather than generate a new one.”
Jakub Hajek, Cometari

More Related Content

PPTX
Economic importance and mass production of lady bird beetle
PPTX
Insect order by kotresh
PPTX
PERANAN BIDANG AGRONOMI DALAM MENINGKATKAN KUALITAS PERTANIAN
PDF
Bab v diagnosis hama tanaman
PDF
insect antenne-.pdf
PPTX
Nematode Excretory System: Structure & Significance By SUNDUS SUHAIL
PPTX
VERTIKULTUR Yenny permata sari PPB 3D
PPTX
Bean pod borer (entomology)
Economic importance and mass production of lady bird beetle
Insect order by kotresh
PERANAN BIDANG AGRONOMI DALAM MENINGKATKAN KUALITAS PERTANIAN
Bab v diagnosis hama tanaman
insect antenne-.pdf
Nematode Excretory System: Structure & Significance By SUNDUS SUHAIL
VERTIKULTUR Yenny permata sari PPB 3D
Bean pod borer (entomology)

What's hot (20)

PPTX
Order dermaptera by Christiana :)
DOCX
460012937-Rpp-kelas-rangkap-model-221-docx.docx
PDF
Order:- hymenoptera(important families)
PDF
pkp 1-5 setelah perbaikan 3-dikompresi.pdf
PPTX
Unit I Integumentary system-Skin.pptx
PPTX
ANTENNAE.pptx
DOC
LA-Paket-1.1. Ruslan.doc
PPTX
Aphid
PPT
Kacang panjang
DOC
Kepiting Bakau
PPTX
Produksi Tanaman Mentimun
PPTX
Aesa based phm to promote sustainable agric
PPTX
PPTX
Paddy pests 11
DOCX
Biologi Perikanan Kebiasaan Makan Ikan
PDF
Modul Ajar Bahasa Indonesia Kelas 3 Fase B Kurikulum Merdeka
PPT
TERUMBU KARANG: Manfaat Ekologi dan Ekonomi, beserta faktor pengancamnya
Order dermaptera by Christiana :)
460012937-Rpp-kelas-rangkap-model-221-docx.docx
Order:- hymenoptera(important families)
pkp 1-5 setelah perbaikan 3-dikompresi.pdf
Unit I Integumentary system-Skin.pptx
ANTENNAE.pptx
LA-Paket-1.1. Ruslan.doc
Aphid
Kacang panjang
Kepiting Bakau
Produksi Tanaman Mentimun
Aesa based phm to promote sustainable agric
Paddy pests 11
Biologi Perikanan Kebiasaan Makan Ikan
Modul Ajar Bahasa Indonesia Kelas 3 Fase B Kurikulum Merdeka
TERUMBU KARANG: Manfaat Ekologi dan Ekonomi, beserta faktor pengancamnya
Ad

Similar to Traefik 2.x features - canary deployment with Traefik and K3S (20)

PDF
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
PDF
Canary deployment with Traefik and K3S
PDF
Traefik as an open source edge router for microservice architectures
PDF
Container Orchestration with Traefik 2.x
PDF
Cloud-native .NET Microservices mit Kubernetes
PDF
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
PPTX
Full stack development best practice and toolset
PDF
Cloud-native .NET-Microservices mit Kubernetes @BASTAcon
PPTX
Connect Everything with NATS - Cloud Expo Europe
PPTX
Docker Networking - Common Issues and Troubleshooting Techniques
PPTX
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
PPTX
What's New in Docker - February 2017
PDF
Containerising bootiful microservices javaeeconf
PPTX
Kubered -Recipes for C2 Operations on Kubernetes
PDF
21st Docker Switzerland Meetup - ISTIO
PDF
Docker meetup - PaaS interoperability
PDF
A hitchhiker‘s guide to the cloud native stack
PDF
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
PPTX
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
PDF
Chicago Docker Meetup Presentation - Mediafly
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
Canary deployment with Traefik and K3S
Traefik as an open source edge router for microservice architectures
Container Orchestration with Traefik 2.x
Cloud-native .NET Microservices mit Kubernetes
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
Full stack development best practice and toolset
Cloud-native .NET-Microservices mit Kubernetes @BASTAcon
Connect Everything with NATS - Cloud Expo Europe
Docker Networking - Common Issues and Troubleshooting Techniques
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
What's New in Docker - February 2017
Containerising bootiful microservices javaeeconf
Kubered -Recipes for C2 Operations on Kubernetes
21st Docker Switzerland Meetup - ISTIO
Docker meetup - PaaS interoperability
A hitchhiker‘s guide to the cloud native stack
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Chicago Docker Meetup Presentation - Mediafly
Ad

More from Jakub Hajek (6)

PDF
Docker Logging and analysing with Elastic Stack
PDF
Docker Swarm and Traefik 2.0
PDF
Container Orchestration with Traefk on Docker Swarm
PDF
Cometari Dedicated Solutions Company Presentation
PDF
Cometari Dedicated Solutions Oferta ogólna
PDF
Cometari Dedicated Solutions General Offer
Docker Logging and analysing with Elastic Stack
Docker Swarm and Traefik 2.0
Container Orchestration with Traefk on Docker Swarm
Cometari Dedicated Solutions Company Presentation
Cometari Dedicated Solutions Oferta ogólna
Cometari Dedicated Solutions General Offer

Recently uploaded (20)

PPTX
Big Data Technologies - Introduction.pptx
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
1. Introduction to Computer Programming.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
A Presentation on Artificial Intelligence
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
cuic standard and advanced reporting.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Tartificialntelligence_presentation.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
Big Data Technologies - Introduction.pptx
Group 1 Presentation -Planning and Decision Making .pptx
1. Introduction to Computer Programming.pptx
Electronic commerce courselecture one. Pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
A Presentation on Artificial Intelligence
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation_ Review paper, used for researhc scholars
cuic standard and advanced reporting.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Dropbox Q2 2025 Financial Results & Investor Presentation
Programs and apps: productivity, graphics, security and other tools
Per capita expenditure prediction using model stacking based on satellite ima...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
A comparative analysis of optical character recognition models for extracting...
Spectroscopy.pptx food analysis technology
Tartificialntelligence_presentation.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Reach Out and Touch Someone: Haptics and Empathic Computing

Traefik 2.x features - canary deployment with Traefik and K3S

  • 1. TRAEFIK 2.X JAKUB HAJEK MAY, 7TH, 2020 WHAT HAS CANARY DEPLOYMENT GOT TO DO WITH SCRAMBLED EGGS?
  • 2. ▸ I am the owner and technical consultant (SRE) ▸ I work for Cometari ▸ I’ve been system admin since 1998 ▸ Cometari is a solutions company implementing DevOps culture and providing consultancy, workshops and software services. ▸ Our expertise are DevOps, Elastic Stack log analysis INTRODUCTION - JAKUB HAJEK
  • 3. ▸ SRE & Co - founder 56k.cloud ▸ Background containers, Cloud & engineering ▸ Cloud Architect for large deployments ▸ Passionate about DevOps & Monitoring and of course Mountain Biking ▸ Host of TheByte.io Podcast ▸ Docker Captain ▸ Traefik Ambassador INTRODUCTION - BRIAN CHRISTNER
  • 4. ▸ Cloud Development Manager @Done ▸ Software Section Lead, writer and speaker @msHOWTO ▸ An active member of Cloud Family ▸ Passionate about Software Development, Cloud and DevOps ▸ Mountain Biking ▸ Traefik Ambassador INTRODUCTION - MERT YETER
  • 5. The aim of this meetup is to present what the key features delivered with Traefik 2.x are
  • 7. ENTRYPOINT ROUTER SERVICE MIDDLEWARE 1 MIDDLEWARE 2 MIDDLEWARE 3 Request Calls to backend servers WHAT IS IT TRAEFIK?
  • 8. TRAEFIK 2.X KEY FEATURES ▸ ROUTER= frontend, SERVICE=backend, MIDDLEWARE=rules ▸ TCP / UDP / GRPC support ▸ Kubernetes CRD ▸ Fully customisable routes via middleware, which can be reused on many routers ▸ YAML, TOML is still good ▸ A new dashboard with web UI ▸ Canary deployment with Service Load balancer ▸ Network traffic Mirroring with Service Load balancer ▸ Session Stickiness ▸ Consul catalog
  • 9. ENTRYPOINTS :80, :443 ROUTERS PROVIDER 1 Traefik configuration introduction PROVIDER CONNECTION INFORMATION SERVICES MIDDLEWARES CERTIFICATES PROVIDER 2 DYNAMIC (WHILE RUNNING)STATIC (STARTUP TIME)
  • 11. KUBERNETES CRD AND AVAILABLE CUSTOM RESOURCES ▸ Ingressroute - HTTP routing - http router ▸ Middleware - tweaks the HTTP before they are sent to a service - HTTP Middleware ▸ TraefikService - abstraction for HTTP LB/mirroring ▸ IngressRouteTCP - TCP routing - TCP router ▸ TLSOptions - TLS connection parameters https://docs.traefik.io/routing/providers/kubernetes-crd/
  • 14. CANARY DEPLOYMENT ▸ Deployment vs Release ▸ Instead of switching to new version in one step, we use a phased approach ▸ We deploy a new app in a small part of the production infrastructure ▸ Only a few users (1%) are routed to the newest version (Release) ▸ With no errors reported, the new version can be released to the rest of the infrastructure.
  • 15. CANARY VERSION 2 VERSION 1 https://service Canary deployment with Service Load balancers 1% of live traffic, a few users Majority of users https://github.com/containous/traefik/issues/1164
  • 16. CANARY VERSION 2 https://service Canary deployment with Service Load balancers VERSION 2VERSION 2VERSION 2
  • 17. MIRRORING OR LIVE TRAFFIC SHADOW ▸ Understand difference between Deployment vs Release ▸ Deployment brings new code to the production, no production traffic yet! ▸ Run smoke, integration tests to make sure that new deployment has no impact to your users ▸ Release brings live traffic to a deployment. ▸ We can shadow live traffic to the new deployment and reduce the risk of failure.
  • 18. MIRRORING VERSION 2 VERSION 1 https://service Mirroring with Service Load Balancer 20% https://github.com/containous/traefik/issues/2989
  • 20. DEMO ENVIRONMENT IN DETAILS ▸ K3S cluster consisting of 3 nodes ▸ SSL certs issued by Lets Encrypt ▸ FQDN domains: ▸ https://a.labs.cometari.eu ▸ https://c.labs.cometari.eu ▸ DNS Round Robin: Route 53 with its implemented health checks
  • 21. K3S CLUSTER IN 2 COMMANDS ▸ MASTER: ▸ curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --no-deploy traefik -- node-name node1" sh - ▸ WORKERS: ▸ curl -sfL https://get.k3s.io | K3S_URL=https://master- node.com:6443 K3S_TOKEN=SECRET_TOKEN INSTALL_K3S_EXEC=“agent --node-name node2" sh -
  • 22. Talk is cheap, show me the code!
  • 24. DEMO SCENARIOS ▸ Web UI to see how services are deployed ▸ Example of Canary deployment ▸ Example of Mirroring configuration
  • 25. A FEW BENEFITS OF CANARY DEPLOYMENT ▸ Traefik provides flexible way to proceed with canary (K8S, K3S, Swarm) ▸ Reduce time to market ▸ Canary deployment allows you validate your application in real production environment ▸ Rolling out releases ▸ No need to maintain a lot of staging / testing environments
  • 26. SOURCE CODE OF CONFIGURATION FILES ▸ https://github.com/jakubhajek/traefik-kubernetescrd
  • 28. “I strongly believe that implementing DevOps culture, across the entire organisation, should provide measurable value and solve the real issue rather than generate a new one.” Jakub Hajek, Cometari