SlideShare a Scribd company logo
CONTAINER ORCHESTRATION
WITH TRAEFIK 2.X
JAKUB HAJEK
JANUARY 15TH, 2020
▸ I am the owner and technical consultant working 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, Cloud
▸ We are deeply involved in the travel tech industry
▸ However our solutions go much further than just integrating
travel API’s.
INTRODUCTION
“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
The goal of this presentation is to show you how we work
with distributed systems and how Traefik makes our daily work
easier.
CONTAINERS
IMMUTABLE CONTAINERS
▸ Mutable vs Immutable
▸ No incremental changes to the image
▸ No more drifting configuration
▸ (No) imperative updates
▸ Base image + source code = An artefact / immutable image
▸ The artefact is scaling unit in distributed systems
▸ Canary and mirror deployments
▸ Rollback if an error occurs
Immutable containers are at the core of any distributed systems
TRAEFIK 2.X
TRAEFIK 2.X KEY FEATURES
▸ TCP support
▸ ROUTER= frontend, SERVICE=backend, MIDDLEWARES=rules
▸ 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
▸ 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)
ENTRYPOINT ROUTER SERVICE
MIDDLEWARE 1 MIDDLEWARE 2 MIDDLEWARE 3
Request Calls to backend servers
Tweaking request before / after the arrives to their destination
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
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
IMMUTABLE CONTAINER WITH TRAEFIK
▸ Custom image with Traefik with added SSL certificate into
image
▸ Configuration files added directly to the image
▸ Works perfectly if you bought SSL cert and don’t use
dynamically updated Let’s Encrypt
▸ Horizontal scalability is simple, no need to care about the
persistence for Let’s Encrypt certificates
OBSERVABILITY
▸ Enable Prometheus or any other backend
▸ Use Grafana to visualise metrics
▸ Use existing dashboards to visualise data (or develop your
own)
LOGGING AND VISUALISING ACCESS LOGS
▸ Traefik logs are in JSON including startup and errors events
▸ Access logs are written to STDOUT in JSON format.
▸ Treat logs as an event and transfer them to external system
(Elastic Stack + Fluentd)
▸ Use Kibana and Logs tab to have live data streaming
▸ Develop dashboard with a map and place GEO points of IP
addresses
CONFIGURATION TIPS
▸ Don’t mix static configuration vs dynamic configuration
▸ CLI command can be used for static config or if you prefer you can define
config file as well
▸ Labels can be used to define dynamic configuration or config files
▸ directory with WATCH flag enabled as well
▸ More advanced rules configuration via middleware are dynamically defined
▸ The most flexible is to run Traefik as container, instead of binary directly
from host
▸ Healthcheck for your services are crucial
DEMO ENVIRONMENT
DEMO ENVIRONMENT IN DETAILS
▸ Docker Swarm cluster* consisting of 4 nodes
▸ SSL certs issued by Lets Encrypt
▸ FQDN domains:
▸ https://traefik.labs.cometari.eu
▸ https://node-app.labs.cometari.eu
▸ https://canary.labs.cometari.eu
▸ DNS Round Robin: Route 53 with its implemented health checks
▸ Prometheus and Grafana
▸ Elastic stack, Fluentd to store and visualise data logs
▸ Web Server and NodeJS backend
▸ Stacks: Traefik, App stack, Consul for consul catalog
Diagram of demo environment
TRAEFIK
WEB FRONTEND
NODEJS BACKEND
Overview of configuration files!
DEMO TIME
DEMO SCENARIOS
▸ Web UI to see how services are deployed
▸ Scaling services and generating some network traffic via
Slapper
▸ Example of Canary deployment
▸ Metrics from Traefik in open metrics format
SUMMARY
▸ Traefik provides flexible way to expose services, auto discovery
▸ It can be configured in multiple way, there are no ready to use config - just
refer to configuration tips
▸ Fully customise routes via middlewares
▸ Easily integrates with every major cluster technology
▸ Lets Encrypt integrated, managing SSL certs is easy
▸ Metrics, Tracing, Logs
▸ Rolling out releases thanks to Canary deployments
▸ Mirroring - duplicating incoming request and send them to different services.
THANK YOU
@_JAKUBHAJEK
JAKUB.HAJEK@COMETARI.COM
Ad

More Related Content

What's hot (19)

KubeCon EU 2016 Keynote: Pushing Kubernetes Forward
KubeCon EU 2016 Keynote: Pushing Kubernetes ForwardKubeCon EU 2016 Keynote: Pushing Kubernetes Forward
KubeCon EU 2016 Keynote: Pushing Kubernetes Forward
KubeAcademy
 
Heptio Contour - talk CNCF Nantes
Heptio Contour - talk CNCF NantesHeptio Contour - talk CNCF Nantes
Heptio Contour - talk CNCF Nantes
Gaëlle Acas
 
CNCF explore k8s_api
CNCF explore k8s_apiCNCF explore k8s_api
CNCF explore k8s_api
Erhwen Kuo
 
DevOpsDays Taipei 2017 - Terraform: Everything Is Code
DevOpsDays Taipei 2017 - Terraform: Everything Is CodeDevOpsDays Taipei 2017 - Terraform: Everything Is Code
DevOpsDays Taipei 2017 - Terraform: Everything Is Code
smalltown
 
Kubernetes monitoring using prometheus stack
Kubernetes monitoring using prometheus stackKubernetes monitoring using prometheus stack
Kubernetes monitoring using prometheus stack
Juraj Hantak
 
Cncf explore k8s_api_go
Cncf explore k8s_api_goCncf explore k8s_api_go
Cncf explore k8s_api_go
Erhwen Kuo
 
Vault Secrets Via API for the REST of Us
Vault Secrets Via API for the REST of UsVault Secrets Via API for the REST of Us
Vault Secrets Via API for the REST of Us
Mitchell Pronschinske
 
The Challenges of Becoming Cloud Native
The Challenges of Becoming Cloud NativeThe Challenges of Becoming Cloud Native
The Challenges of Becoming Cloud Native
Ben Hall
 
CDK Meetup: Rule the World through IaC
CDK Meetup: Rule the World through IaCCDK Meetup: Rule the World through IaC
CDK Meetup: Rule the World through IaC
smalltown
 
NetflixOSS Meetup S6E2 - Spinnaker, Kayenta
NetflixOSS Meetup S6E2 - Spinnaker, KayentaNetflixOSS Meetup S6E2 - Spinnaker, Kayenta
NetflixOSS Meetup S6E2 - Spinnaker, Kayenta
aspyker
 
Cncf k8s_network_03 (Ingress introduction)
Cncf k8s_network_03 (Ingress introduction)Cncf k8s_network_03 (Ingress introduction)
Cncf k8s_network_03 (Ingress introduction)
Erhwen Kuo
 
OpenWhisk and IBM cloud functions
OpenWhisk and IBM cloud functionsOpenWhisk and IBM cloud functions
OpenWhisk and IBM cloud functions
Moby Project
 
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...
Codemotion
 
FaaS-and-Furious
FaaS-and-FuriousFaaS-and-Furious
FaaS-and-Furious
Moby Project
 
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps WayDevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
smalltown
 
Monitoring Weave Cloud with Prometheus
Monitoring Weave Cloud with PrometheusMonitoring Weave Cloud with Prometheus
Monitoring Weave Cloud with Prometheus
Weaveworks
 
How to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxData
How to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxDataHow to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxData
How to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxData
InfluxData
 
Cncf Istio introduction
Cncf Istio introductionCncf Istio introduction
Cncf Istio introduction
Erhwen Kuo
 
Using Kubernetes to deploy Django in GCP
Using Kubernetes to deploy Django in GCPUsing Kubernetes to deploy Django in GCP
Using Kubernetes to deploy Django in GCP
Walter Liu
 
KubeCon EU 2016 Keynote: Pushing Kubernetes Forward
KubeCon EU 2016 Keynote: Pushing Kubernetes ForwardKubeCon EU 2016 Keynote: Pushing Kubernetes Forward
KubeCon EU 2016 Keynote: Pushing Kubernetes Forward
KubeAcademy
 
Heptio Contour - talk CNCF Nantes
Heptio Contour - talk CNCF NantesHeptio Contour - talk CNCF Nantes
Heptio Contour - talk CNCF Nantes
Gaëlle Acas
 
CNCF explore k8s_api
CNCF explore k8s_apiCNCF explore k8s_api
CNCF explore k8s_api
Erhwen Kuo
 
DevOpsDays Taipei 2017 - Terraform: Everything Is Code
DevOpsDays Taipei 2017 - Terraform: Everything Is CodeDevOpsDays Taipei 2017 - Terraform: Everything Is Code
DevOpsDays Taipei 2017 - Terraform: Everything Is Code
smalltown
 
Kubernetes monitoring using prometheus stack
Kubernetes monitoring using prometheus stackKubernetes monitoring using prometheus stack
Kubernetes monitoring using prometheus stack
Juraj Hantak
 
Cncf explore k8s_api_go
Cncf explore k8s_api_goCncf explore k8s_api_go
Cncf explore k8s_api_go
Erhwen Kuo
 
Vault Secrets Via API for the REST of Us
Vault Secrets Via API for the REST of UsVault Secrets Via API for the REST of Us
Vault Secrets Via API for the REST of Us
Mitchell Pronschinske
 
The Challenges of Becoming Cloud Native
The Challenges of Becoming Cloud NativeThe Challenges of Becoming Cloud Native
The Challenges of Becoming Cloud Native
Ben Hall
 
CDK Meetup: Rule the World through IaC
CDK Meetup: Rule the World through IaCCDK Meetup: Rule the World through IaC
CDK Meetup: Rule the World through IaC
smalltown
 
NetflixOSS Meetup S6E2 - Spinnaker, Kayenta
NetflixOSS Meetup S6E2 - Spinnaker, KayentaNetflixOSS Meetup S6E2 - Spinnaker, Kayenta
NetflixOSS Meetup S6E2 - Spinnaker, Kayenta
aspyker
 
Cncf k8s_network_03 (Ingress introduction)
Cncf k8s_network_03 (Ingress introduction)Cncf k8s_network_03 (Ingress introduction)
Cncf k8s_network_03 (Ingress introduction)
Erhwen Kuo
 
OpenWhisk and IBM cloud functions
OpenWhisk and IBM cloud functionsOpenWhisk and IBM cloud functions
OpenWhisk and IBM cloud functions
Moby Project
 
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...
Webhooks do's and dont's: what we learned after integrating +100 APIs - Giuli...
Codemotion
 
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps WayDevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
smalltown
 
Monitoring Weave Cloud with Prometheus
Monitoring Weave Cloud with PrometheusMonitoring Weave Cloud with Prometheus
Monitoring Weave Cloud with Prometheus
Weaveworks
 
How to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxData
How to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxDataHow to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxData
How to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxData
InfluxData
 
Cncf Istio introduction
Cncf Istio introductionCncf Istio introduction
Cncf Istio introduction
Erhwen Kuo
 
Using Kubernetes to deploy Django in GCP
Using Kubernetes to deploy Django in GCPUsing Kubernetes to deploy Django in GCP
Using Kubernetes to deploy Django in GCP
Walter Liu
 

Similar to Container Orchestration with Traefik 2.x (20)

Traefik as an open source edge router for microservice architectures
Traefik as an open source edge router for microservice architecturesTraefik as an open source edge router for microservice architectures
Traefik as an open source edge router for microservice architectures
Jakub Hajek
 
Traefik 2.x features - canary deployment with Traefik and K3S
Traefik 2.x features - canary deployment with Traefik and K3STraefik 2.x features - canary deployment with Traefik and K3S
Traefik 2.x features - canary deployment with Traefik and K3S
Jakub Hajek
 
Canary deployment with Traefik and K3S
Canary deployment with Traefik and K3SCanary deployment with Traefik and K3S
Canary deployment with Traefik and K3S
Jakub Hajek
 
Full stack development best practice and toolset
Full stack development best practice and toolsetFull stack development best practice and toolset
Full stack development best practice and toolset
Reid Lai
 
Cloud Infrastructure Modernisation Guide
Cloud Infrastructure Modernisation GuideCloud Infrastructure Modernisation Guide
Cloud Infrastructure Modernisation Guide
Montel Intergalactic
 
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
Juraj Hantak
 
How to Design a Backend for IoT
How to Design a Backend for IoTHow to Design a Backend for IoT
How to Design a Backend for IoT
İbrahim Gürses
 
Developing Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/KubernetesDeveloping Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/Kubernetes
Chakradhar Rao Jonagam
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
VMware Tanzu
 
Pivotal Platform - December Release A First Look
Pivotal Platform - December Release A First LookPivotal Platform - December Release A First Look
Pivotal Platform - December Release A First Look
VMware Tanzu
 
GCP Meetup #3 - Approaches to Cloud Native Architectures
GCP Meetup #3 - Approaches to Cloud Native ArchitecturesGCP Meetup #3 - Approaches to Cloud Native Architectures
GCP Meetup #3 - Approaches to Cloud Native Architectures
nine
 
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
DigitalOcean
 
Cloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesCloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit Kubernetes
QAware GmbH
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetes
sparkfabrik
 
The biggest constraint to devops in the cloud has a solution
The biggest constraint to devops in the cloud has a solutionThe biggest constraint to devops in the cloud has a solution
The biggest constraint to devops in the cloud has a solution
Flexiant
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
Patrick Chanezon
 
Intro to Cloud Native _ v1.0en (2021/01)
Intro to Cloud Native _ v1.0en (2021/01)Intro to Cloud Native _ v1.0en (2021/01)
Intro to Cloud Native _ v1.0en (2021/01)
Young Suk Ahn Park
 
The Future of Cloud Innovation, featuring Adrian Cockcroft
The Future of Cloud Innovation, featuring Adrian CockcroftThe Future of Cloud Innovation, featuring Adrian Cockcroft
The Future of Cloud Innovation, featuring Adrian Cockcroft
Dun & Bradstreet Cloud Innovation Center
 
XFORMATION Open Platform in Enterprise wide SOA Adoption
XFORMATION Open Platform in Enterprise wide SOA Adoption XFORMATION Open Platform in Enterprise wide SOA Adoption
XFORMATION Open Platform in Enterprise wide SOA Adoption
Papu Bhattacharya
 
CI/CD on Google Cloud Platform
CI/CD on Google Cloud PlatformCI/CD on Google Cloud Platform
CI/CD on Google Cloud Platform
DevOps Indonesia
 
Traefik as an open source edge router for microservice architectures
Traefik as an open source edge router for microservice architecturesTraefik as an open source edge router for microservice architectures
Traefik as an open source edge router for microservice architectures
Jakub Hajek
 
Traefik 2.x features - canary deployment with Traefik and K3S
Traefik 2.x features - canary deployment with Traefik and K3STraefik 2.x features - canary deployment with Traefik and K3S
Traefik 2.x features - canary deployment with Traefik and K3S
Jakub Hajek
 
Canary deployment with Traefik and K3S
Canary deployment with Traefik and K3SCanary deployment with Traefik and K3S
Canary deployment with Traefik and K3S
Jakub Hajek
 
Full stack development best practice and toolset
Full stack development best practice and toolsetFull stack development best practice and toolset
Full stack development best practice and toolset
Reid Lai
 
Cloud Infrastructure Modernisation Guide
Cloud Infrastructure Modernisation GuideCloud Infrastructure Modernisation Guide
Cloud Infrastructure Modernisation Guide
Montel Intergalactic
 
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
Juraj Hantak
 
How to Design a Backend for IoT
How to Design a Backend for IoTHow to Design a Backend for IoT
How to Design a Backend for IoT
İbrahim Gürses
 
Developing Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/KubernetesDeveloping Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/Kubernetes
Chakradhar Rao Jonagam
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
VMware Tanzu
 
Pivotal Platform - December Release A First Look
Pivotal Platform - December Release A First LookPivotal Platform - December Release A First Look
Pivotal Platform - December Release A First Look
VMware Tanzu
 
GCP Meetup #3 - Approaches to Cloud Native Architectures
GCP Meetup #3 - Approaches to Cloud Native ArchitecturesGCP Meetup #3 - Approaches to Cloud Native Architectures
GCP Meetup #3 - Approaches to Cloud Native Architectures
nine
 
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
DigitalOcean
 
Cloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesCloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit Kubernetes
QAware GmbH
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetes
sparkfabrik
 
The biggest constraint to devops in the cloud has a solution
The biggest constraint to devops in the cloud has a solutionThe biggest constraint to devops in the cloud has a solution
The biggest constraint to devops in the cloud has a solution
Flexiant
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
Patrick Chanezon
 
Intro to Cloud Native _ v1.0en (2021/01)
Intro to Cloud Native _ v1.0en (2021/01)Intro to Cloud Native _ v1.0en (2021/01)
Intro to Cloud Native _ v1.0en (2021/01)
Young Suk Ahn Park
 
XFORMATION Open Platform in Enterprise wide SOA Adoption
XFORMATION Open Platform in Enterprise wide SOA Adoption XFORMATION Open Platform in Enterprise wide SOA Adoption
XFORMATION Open Platform in Enterprise wide SOA Adoption
Papu Bhattacharya
 
CI/CD on Google Cloud Platform
CI/CD on Google Cloud PlatformCI/CD on Google Cloud Platform
CI/CD on Google Cloud Platform
DevOps Indonesia
 
Ad

More from Jakub Hajek (6)

Docker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic Stack
Jakub Hajek
 
Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0
Jakub Hajek
 
Container Orchestration with Traefk on Docker Swarm
Container Orchestration with Traefk on Docker SwarmContainer Orchestration with Traefk on Docker Swarm
Container Orchestration with Traefk on Docker Swarm
Jakub Hajek
 
Cometari Dedicated Solutions Company Presentation
Cometari Dedicated Solutions Company PresentationCometari Dedicated Solutions Company Presentation
Cometari Dedicated Solutions Company Presentation
Jakub Hajek
 
Cometari Dedicated Solutions Oferta ogólna
Cometari Dedicated Solutions Oferta ogólnaCometari Dedicated Solutions Oferta ogólna
Cometari Dedicated Solutions Oferta ogólna
Jakub Hajek
 
Cometari Dedicated Solutions General Offer
Cometari Dedicated Solutions General OfferCometari Dedicated Solutions General Offer
Cometari Dedicated Solutions General Offer
Jakub Hajek
 
Docker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic Stack
Jakub Hajek
 
Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0
Jakub Hajek
 
Container Orchestration with Traefk on Docker Swarm
Container Orchestration with Traefk on Docker SwarmContainer Orchestration with Traefk on Docker Swarm
Container Orchestration with Traefk on Docker Swarm
Jakub Hajek
 
Cometari Dedicated Solutions Company Presentation
Cometari Dedicated Solutions Company PresentationCometari Dedicated Solutions Company Presentation
Cometari Dedicated Solutions Company Presentation
Jakub Hajek
 
Cometari Dedicated Solutions Oferta ogólna
Cometari Dedicated Solutions Oferta ogólnaCometari Dedicated Solutions Oferta ogólna
Cometari Dedicated Solutions Oferta ogólna
Jakub Hajek
 
Cometari Dedicated Solutions General Offer
Cometari Dedicated Solutions General OfferCometari Dedicated Solutions General Offer
Cometari Dedicated Solutions General Offer
Jakub Hajek
 
Ad

Recently uploaded (20)

UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 

Container Orchestration with Traefik 2.x

  • 1. CONTAINER ORCHESTRATION WITH TRAEFIK 2.X JAKUB HAJEK JANUARY 15TH, 2020
  • 2. ▸ I am the owner and technical consultant working 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, Cloud ▸ We are deeply involved in the travel tech industry ▸ However our solutions go much further than just integrating travel API’s. INTRODUCTION
  • 3. “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
  • 4. The goal of this presentation is to show you how we work with distributed systems and how Traefik makes our daily work easier.
  • 6. IMMUTABLE CONTAINERS ▸ Mutable vs Immutable ▸ No incremental changes to the image ▸ No more drifting configuration ▸ (No) imperative updates ▸ Base image + source code = An artefact / immutable image ▸ The artefact is scaling unit in distributed systems ▸ Canary and mirror deployments ▸ Rollback if an error occurs
  • 7. Immutable containers are at the core of any distributed systems
  • 9. TRAEFIK 2.X KEY FEATURES ▸ TCP support ▸ ROUTER= frontend, SERVICE=backend, MIDDLEWARES=rules ▸ 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 ▸ Consul catalog
  • 10. ENTRYPOINTS :80, :443 ROUTERS PROVIDER 1 Traefik configuration introduction PROVIDER CONNECTION INFORMATION SERVICES MIDDLEWARES CERTIFICATES PROVIDER 2 DYNAMIC (WHILE RUNNING)STATIC (STARTUP TIME)
  • 11. ENTRYPOINT ROUTER SERVICE MIDDLEWARE 1 MIDDLEWARE 2 MIDDLEWARE 3 Request Calls to backend servers Tweaking request before / after the arrives to their destination
  • 12. 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.
  • 13. MIRRORING VERSION 2 VERSION 1 https://service Mirroring with Service Load Balancer 20% https://github.com/containous/traefik/issues/2989
  • 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. IMMUTABLE CONTAINER WITH TRAEFIK ▸ Custom image with Traefik with added SSL certificate into image ▸ Configuration files added directly to the image ▸ Works perfectly if you bought SSL cert and don’t use dynamically updated Let’s Encrypt ▸ Horizontal scalability is simple, no need to care about the persistence for Let’s Encrypt certificates
  • 18. OBSERVABILITY ▸ Enable Prometheus or any other backend ▸ Use Grafana to visualise metrics ▸ Use existing dashboards to visualise data (or develop your own)
  • 19. LOGGING AND VISUALISING ACCESS LOGS ▸ Traefik logs are in JSON including startup and errors events ▸ Access logs are written to STDOUT in JSON format. ▸ Treat logs as an event and transfer them to external system (Elastic Stack + Fluentd) ▸ Use Kibana and Logs tab to have live data streaming ▸ Develop dashboard with a map and place GEO points of IP addresses
  • 20. CONFIGURATION TIPS ▸ Don’t mix static configuration vs dynamic configuration ▸ CLI command can be used for static config or if you prefer you can define config file as well ▸ Labels can be used to define dynamic configuration or config files ▸ directory with WATCH flag enabled as well ▸ More advanced rules configuration via middleware are dynamically defined ▸ The most flexible is to run Traefik as container, instead of binary directly from host ▸ Healthcheck for your services are crucial
  • 22. DEMO ENVIRONMENT IN DETAILS ▸ Docker Swarm cluster* consisting of 4 nodes ▸ SSL certs issued by Lets Encrypt ▸ FQDN domains: ▸ https://traefik.labs.cometari.eu ▸ https://node-app.labs.cometari.eu ▸ https://canary.labs.cometari.eu ▸ DNS Round Robin: Route 53 with its implemented health checks ▸ Prometheus and Grafana ▸ Elastic stack, Fluentd to store and visualise data logs ▸ Web Server and NodeJS backend ▸ Stacks: Traefik, App stack, Consul for consul catalog
  • 23. Diagram of demo environment TRAEFIK WEB FRONTEND NODEJS BACKEND
  • 26. DEMO SCENARIOS ▸ Web UI to see how services are deployed ▸ Scaling services and generating some network traffic via Slapper ▸ Example of Canary deployment ▸ Metrics from Traefik in open metrics format
  • 27. SUMMARY ▸ Traefik provides flexible way to expose services, auto discovery ▸ It can be configured in multiple way, there are no ready to use config - just refer to configuration tips ▸ Fully customise routes via middlewares ▸ Easily integrates with every major cluster technology ▸ Lets Encrypt integrated, managing SSL certs is easy ▸ Metrics, Tracing, Logs ▸ Rolling out releases thanks to Canary deployments ▸ Mirroring - duplicating incoming request and send them to different services.