![Page 1: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes](https://reader034.vdocuments.us/reader034/viewer/2022042302/5ecdaccae6a6dc1a70663fec/html5/thumbnails/1.jpg)
FlaggerService Mesh Progressive Delivery Operator
Stefan Prodan @stefanprodan
KubeCon Barcelona May 2019
1
![Page 2: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes](https://reader034.vdocuments.us/reader034/viewer/2022042302/5ecdaccae6a6dc1a70663fec/html5/thumbnails/2.jpg)
Introducing Flagger
Flagger is a Kubernetes operator that automates the promotion of canary deployments using App Mesh, Istio, Gloo or NGINX routing for traffic shifting and Prometheus metrics for canary analysis.
Flagger implements a control loop that gradually shifts traffic to the canary while measuring key performance indicators. Based on the KPIs analysis a canary is promoted or aborted.
![Page 3: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes](https://reader034.vdocuments.us/reader034/viewer/2022042302/5ecdaccae6a6dc1a70663fec/html5/thumbnails/3.jpg)
Flagger overview
![Page 4: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes](https://reader034.vdocuments.us/reader034/viewer/2022042302/5ecdaccae6a6dc1a70663fec/html5/thumbnails/4.jpg)
Flagger Goals
● Give developers confidence in automating the production releases○ Have control over the blast radius (traffic management)○ Have control over the validation process (perf metrics)
● Make the deployment process observable ○ Real time feedback (Prometheus/Grafana)○ Alerting (Slack/Alertmanager/PagerDuty/etc)○ Emit Kubernetes events every time something changes
● Write as little YAML as possible● Manage the whole process from Git
![Page 5: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes](https://reader034.vdocuments.us/reader034/viewer/2022042302/5ecdaccae6a6dc1a70663fec/html5/thumbnails/5.jpg)
Have control over the blast radius
![Page 6: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes](https://reader034.vdocuments.us/reader034/viewer/2022042302/5ecdaccae6a6dc1a70663fec/html5/thumbnails/6.jpg)
Have control over the validation process
Flagger lets you define key performance indicators and thresholds. The decision to pause the traffic shift, abort or promote a canary is based on:
● Deployment health status● Request success rate percentage (Envoy metric)● Request latency average value (Envoy metric)● Custom metric checks (Prometheus queries)● Webhooks (integration testing, load testing, etc)
![Page 7: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes](https://reader034.vdocuments.us/reader034/viewer/2022042302/5ecdaccae6a6dc1a70663fec/html5/thumbnails/7.jpg)
Make the deployment process observable
Flagger comes with a Grafana dashboard for canary analysis.
![Page 8: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes](https://reader034.vdocuments.us/reader034/viewer/2022042302/5ecdaccae6a6dc1a70663fec/html5/thumbnails/8.jpg)
Make the deployment process observableFlagger emits Kubernetes events related to the advancement and final status of a canary analysis.
![Page 9: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes](https://reader034.vdocuments.us/reader034/viewer/2022042302/5ecdaccae6a6dc1a70663fec/html5/thumbnails/9.jpg)
Make the deployment process observable
Flagger can be configured to publish the canary analysis result to Slack.
![Page 10: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes](https://reader034.vdocuments.us/reader034/viewer/2022042302/5ecdaccae6a6dc1a70663fec/html5/thumbnails/10.jpg)
Write less YAML
Manual canary setup
Kubernetes objects
1. Canary Deployment2. Canary ClusterIP Service3. Canary Horizontal Pod Autoscaler4. Primary Deployment5. Primary ClusterIP Service6. Primary Horizontal Pod Autoscaler
App Mesh objects
1. Canary virtual node2. Primary virtual node3. HTTP routes4. Virtual router5. Virtual service
Automated canary setup
Kubernetes objects
1. Deployment2. Horizontal Pod Autoscaler
Flagger objects
1. Canary
![Page 11: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes](https://reader034.vdocuments.us/reader034/viewer/2022042302/5ecdaccae6a6dc1a70663fec/html5/thumbnails/11.jpg)
GitOps pipeline
![Page 12: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes](https://reader034.vdocuments.us/reader034/viewer/2022042302/5ecdaccae6a6dc1a70663fec/html5/thumbnails/12.jpg)
GitOps Progressive Delivery Demo
12
![Page 13: Flagger. Stefan... · 2020-01-14 · Custom metric checks (Prometheus queries) Webhooks (integration testing, load testing, etc) Make the deployment process observable Flagger comes](https://reader034.vdocuments.us/reader034/viewer/2022042302/5ecdaccae6a6dc1a70663fec/html5/thumbnails/13.jpg)
Links
13
Flagger Repohttps://github.com/weaveworks/flagger
Flagger Docshttps://docs.flagger.app