{"id":5131,"date":"2020-05-19T19:56:08","date_gmt":"2020-05-19T18:56:08","guid":{"rendered":"https:\/\/blog.fabianpiau.com\/?p=5131"},"modified":"2021-01-14T14:58:54","modified_gmt":"2021-01-14T14:58:54","slug":"flagger-canary-deployments-on-kubernetes","status":"publish","type":"post","link":"https:\/\/blog.fabianpiau.com\/en\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/","title":{"rendered":"Flagger &#8211; Canary deployments on Kubernetes"},"content":{"rendered":"<p><a class=\"lang\" href=\"https:\/\/blog.fabianpiau.com\/fr\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/\" title=\"Lire en fran\u00e7ais\"><strong class=\"labellang\"><span class=\"fr\">&nbsp;<\/span>Version fran\u00e7aise disponible<\/strong><\/a><\/p>\n<div class=\"info\"><strong class=\"label\">Update<\/strong><br \/>\n<strong>October, 17th, 2020 : <\/strong> Use newer versions (Helm 3, Kube 18, Istio 1.7, Flagger 1.2).\n<\/div>\n<p class=\"right\" style=\"padding-left:15px;\"><a href=\"https:\/\/flagger.app\/\" target=\"_blank\" title=\"Flagger logo\" rel=\"noopener noreferrer\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" title=\"Flagger logo\" src=\"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/post\/00096\/flagger-logo.png?resize=180%2C180&#038;ssl=1\" alt=\"Flagger logo\" width=\"180\" height=\"180\" \/><\/a><\/p>\n<p>This article is the second one of the series dedicated to <a href=\"https:\/\/flagger.app\/\" target=\"_blank\" title=\"Flagger\" rel=\"noopener noreferrer\">Flagger<\/a>. In a nutshell, Flagger is a progressive delivery tool that automates the release process for applications running on Kubernetes. It reduces the risk of introducing a new software version in production by gradually shifting traffic to the new version while measuring metrics and running conformance tests.<\/p>\n<p>Make sure you have a local Kubernetes cluster running with the service mesh Istio. If you don&#8217;t, read <a href=\"https:\/\/blog.fabianpiau.com\/en\/2020\/05\/02\/flagger-get-started-with-istio-and-kubernetes\/\" title=\"Flagger \u2013 Get Started with Istio and Kubernetes\">the first article: Flagger \u2013 Get Started with Istio and Kubernetes<\/a>.<\/p>\n<p>In this second guide, we will focus on the installation of Flagger and run multiple canary deployments of the application <a href=\"https:\/\/github.com\/eexit\/mirror-http-server\" target=\"_blank\" title=\"Mirror HTTP Server\" rel=\"noopener noreferrer\">Mirror HTTP Server<\/a> (MHS). Remember that this dummy application can simulate valid and invalid responses based on the request. This is exactly what we need to test the capabilities of Flagger. We will cover both happy (rollout) and unhappy (rollback) scenarios.<\/p>\n<div class=\"info\"><strong class=\"label\">Note<\/strong><br \/>\nThis is a hands-on guide and can be followed step by step on MacOS. It will require some adjustments if you are using a Windows or Linux PC. It is important to note that this article will not go into details and only grasp the concepts &#038; technologies so if you are not familiar with Docker, Kubernetes, Helm or Istio, I strongly advise you to check some documentation yourself before continuing reading.\n<\/div>\n<p><br clear=\"none\" \/><\/p>\n<h4>Installing Flagger<\/h4>\n<p>Let&#8217;s install Flagger by running these commands.<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">kubectl<\/span> create ns flagger-system<br \/><\/div>\n\n<p>We install Flagger in its own namespace <code>flagger-system<\/code>.<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">helm<\/span> repo add flagger https:\/\/flagger.app<br \/><span class=\"wp-shkshell-prompt\"><\/span> <br \/><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">kubectl<\/span> apply -f https:\/\/raw.githubusercontent.com\/weaveworks\/flagger\/master\/artifacts\/flagger\/crd.yaml<br \/><span class=\"wp-shkshell-prompt\"><\/span> <br \/><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">helm<\/span> upgrade -i flagger flagger\/flagger \\<br \/>--namespace=flagger-system \\<br \/>--set crd.create=false \\<br \/>--set meshProvider=istio \\<br \/>--set metricsServer=http:\/\/prometheus.istio-system:9090<br \/><\/div>\n\n<blockquote><p>\nReference: <a href=\"https:\/\/docs.flagger.app\/install\/flagger-install-on-kubernetes\" target=\"_blank\" title=\"Flagger Install on Kubernetes\" rel=\"noopener noreferrer\">Flagger Install on Kubernetes<\/a><br \/>\nFlagger depends on Istio telemetry and Prometheus (in that case, we assume Istio is installed in the <code>istio-system<\/code> namespace).<br \/>\nAll parameters are available on <a href=\"https:\/\/github.com\/fluxcd\/flagger\/blob\/main\/charts\/flagger\/README.md\" target=\"_blank\" title=\"Flagger Github readme file\" rel=\"noopener noreferrer\">the Flagger readme file on GitHub<\/a>.<br \/>\nWe don&#8217;t specify a version for Flagger, which means it will use the latest available in the repo (<code>1.2.0<\/code> at the time of writing).\n<\/p><\/blockquote>\n<p>After a few seconds, you should get a message confirming that Flagger has been installed. From the Kube dashboard, verify that a new namespace has been created <code>flagger-system<\/code> and the Flagger pod is running.<\/p>\n<div style=\"max-width: 560px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/post\/00096\/flagger-deployed-new.png?ssl=1\" rel=\"shadowbox[sbpost-5131];player=img;\" title=\"Flagger is deployed in your cluster\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/post\/00096\/flagger-deployed-new-thumbnail.png?resize=550%2C316&#038;ssl=1\" alt=\"Flagger is deployed in your cluster\" title=\"Flagger is deployed in your cluster\" width=\"550\" height=\"316\" class=\"size-medium wp-image-257\" \/><\/a><p class=\"wp-caption-text\">Flagger is deployed in your cluster<\/p><\/div>\n<p><br clear=\"none\" \/><\/p>\n<h4>Experiment 0 &#8211; Initialize Flagger with MHS v1.1.1<\/h4>\n<p>Mirror HTTP Server has <a href=\"https:\/\/hub.docker.com\/r\/eexit\/mirror-http-server\/tags\" target=\"_blank\" title=\"MHS tags\" rel=\"noopener noreferrer\">multiple versions available<\/a>. To play with Flagger canary deployment feature, we will switch between version <code>1.1.1<\/code>, <code>1.1.2<\/code> and <code>1.1.3<\/code> of MHS (the latest version at the time of writing).<\/p>\n<p>Before deploying MHS, let&#8217;s create a new namespace <code>application<\/code>, we don&#8217;t want to use the default one at the root of the cluster (this is good practice). The name is too generic, but sufficient for this tutorial, in general you will use the name of the team or the name of a group of features.<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">kubectl<\/span> create ns application<br \/><\/div>\n\n<p>Do not forget to activate Istio on this new namespace:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">kubectl<\/span> label namespace application istio-injection=enabled<br \/><\/div>\n\n<p>To deploy MHS via Flagger, I created a <a href=\"https:\/\/helm.sh\/docs\/topics\/charts\/\" target=\"_blank\" title=\"Helm Chart\" rel=\"noopener noreferrer\">Helm chart<\/a>.<\/p>\n<p><a href=\"https:\/\/github.com\/fabianpiau\/mhs-canary-chart\" target=\"_blank\" title=\"MHS Canary Helm Chart\" rel=\"noopener noreferrer\">This &#8220;canary flavored&#8221; chart<\/a> was created based on <a href=\"https:\/\/github.com\/fabianpiau\/mhs-chart\" target=\"_blank\" title=\"MHS Helm Chart\" rel=\"noopener noreferrer\">the previous chart without Flagger<\/a> which itself was created with the <code>helm create mhs-chart<\/code> command, then adapted. In this &#8220;canary flavored&#8221; chart, I did some extra adaptation <a href=\"https:\/\/github.com\/fabianpiau\/mhs-canary-chart\/commit\/8947788253a1b02e91eaca6ed46d5f89d5b6dc5e\" target=\"_blank\" title=\"First commit\" rel=\"noopener noreferrer\">to use 2 replicas instead of 1 to make it more realistic and use a fixed version to <code>1.1.1<\/code><\/a>, I also <a href=\"https:\/\/github.com\/fabianpiau\/mhs-canary-chart\/commit\/e92d8fcc3fa1257bd02370eaae17dcc9fde76378\" target=\"_blank\" title=\"Second commit\" rel=\"noopener noreferrer\">added the canary resource<\/a> where the magic happens.<\/p>\n<p>Clone the chart repo:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">git<\/span> clone https:\/\/github.com\/fabianpiau\/mhs-canary-chart.git<br \/><\/div>\n\n<p>And install MHS:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">cd<\/span> mhs-canary-chart<br \/>helm install --name mhs --namespace application .\/mhs<br \/><\/div>\n\n<p>After a few moments, if you look at the dashboard, you should see 2 replicas of MHS in the namespace <code>application<\/code>.<\/p>\n<div style=\"max-width: 560px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/post\/00096\/mhs-1.1.1-deployed-new.png?ssl=1\" rel=\"shadowbox[sbpost-5131];player=img;\" title=\"MHS 1.1.1 is deployed in your cluster\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/post\/00096\/mhs-1.1.1-deployed-new-thumbnail.png?resize=550%2C315&#038;ssl=1\" alt=\"MHS 1.1.1 is deployed in your cluster\" title=\"MHS 1.1.1 is deployed in your cluster\" width=\"550\" height=\"315\" class=\"size-medium wp-image-257\" \/><\/a><p class=\"wp-caption-text\">MHS 1.1.1 is deployed in your cluster<\/p><\/div>\n<blockquote><p>\nIt is important to note that no canary analysis has been performed and the version has been automatically promoted. It was not a &#8220;real&#8221; canary release.<br \/>\nWhy? Because Flagger needs to initialize itself the first time we do a canary deployment of the application. So make sure the version you are deploying with Flagger the first time is fully tested and works well!<br \/>\nYou could also guess this auto-promotion happened because there was no initial version of the application in the cluster. Although this is obviously a good reason, it&#8217;s important to note that, even if we had a previous version before (e.g. <code>1.1.0<\/code>), the canary version <code>1.1.1<\/code> would have still been automatically promoted without analysis.\n<\/p><\/blockquote>\n<p>You can still check the canary events with:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">kubectl<\/span> -n application describe canary\/mhs<br \/><\/div>\n\n<p>You should have a similar output without a canary analysis:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">Events<\/span>:<br \/>Type     Reason  Age                  From     Message<br \/>----     ------  ----                 ----     -------<br \/>Warning  Synced  2m29s                flagger  mhs-primary.application not ready: waiting for rollout to finish: observed deployment generation less then desired generation<br \/>Normal   Synced  92s (x2 over 2m30s)  flagger  all the metrics providers are available!<br \/>Normal   Synced  92s                  flagger  Initialization done! mhs.application<br \/><\/div>\n\n<p>Or you can also directly check the log from Flagger:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">export<\/span> FLAGGER_POD_NAME=$(<span class=\"wp-shkshell-command\">kubectl<\/span> get pods --namespace flagger-system -l <span class=\"wp-shkshell-string\">\"app.kubernetes.io\/name=flagger,app.kubernetes.io\/instance=flagger\"<\/span> -o jsonpath=\"{.items[<span class=\"wp-shkshell-command\">0<\/span>].metadata.name}\")<br \/><span class=\"wp-shkshell-prompt\"><\/span> <br \/><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">kubectl<\/span> -n flagger-system logs <span class=\"wp-shkshell-variable\">$FLAGGER_POD_NAME<\/span><br \/><\/div>\n\n<p>If you take a closer look at the Kube dashboard, you should see some <code>mhs<\/code> and <code>mhs-primary<\/code> resources:<\/p>\n<ul>\n<li><code>mhs-primary<\/code> are the primary instances (= the non-canary ones). Flagger automatically add the <code>-primary<\/code> suffix to differentiate them from the canary instances.<\/li>\n<li><code>mhs<\/code> are the canary instances. They exist only during the canary deployment and will disappear once the canary deployment ends. That&#8217;s why, in the screenshot above, you don&#8217;t see any <code>mhs<\/code> canary pods (i.e. 0 \/ 0 pod).<\/li>\n<\/ul>\n<blockquote><p>\nWhy this naming convention? I asked Flagger team directly and there is <a href=\"https:\/\/github.com\/fluxcd\/flagger\/issues\/522\" title=\"Use of a -canary suffix for the canary pods instead of a -primary suffix on the normal pods\" target=\"_blank\" rel=\"noopener noreferrer\">a technical constraint<\/a>.\n<\/p><\/blockquote>\n<p>Flagger is now initialized properly and MHS is deployed to your cluster. You can use the terminal to confirm MHS is accessible (thanks to the <a href=\"https:\/\/github.com\/fabianpiau\/mhs-canary-chart\/blob\/master\/mhs\/templates\/gateway.yaml\" title=\"Istio Gateway for MHS\" target=\"_blank\" rel=\"noopener noreferrer\">Istio Gateway<\/a>):<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">curl<\/span> -I -H Host:mhs.example.com <span class=\"wp-shkshell-string\">'http:\/\/localhost'<\/span><br \/><\/div>\n\n<p>You should receive an HTTP 200 OK response:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">HTTP<\/span>\/1.1 200 OK<br \/>x-powered-by: Express<br \/>date: Sun, 17 May 2020 16:47:33 GMT<br \/>x-envoy-upstream-service-time: 10<br \/>server: istio-envoy<br \/>transfer-encoding: chunked<br \/><\/div>\n\n<p>And:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">curl<\/span> -I -H Host:mhs.example.com -H X-Mirror-Code:500 <span class=\"wp-shkshell-string\">'http:\/\/localhost'<\/span><br \/><\/div>\n\n<p>should return an HTTP 500 response:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">HTTP<\/span>\/1.1 500 Internal Server Error<br \/>x-powered-by: Express<br \/>date: Sun, 17 May 2020 16:48:09 GMT<br \/>x-envoy-upstream-service-time: 12<br \/>server: istio-envoy<br \/>transfer-encoding: chunked<br \/><\/div>\n\n<p><br clear=\"none\" \/><\/p>\n<h4>Experiment 1 &#8211; MHS v1.1.2 canary deployment<\/h4>\n<p>We are going to install a newer version <code>1.1.2<\/code>. You need to manually edit the file <code>mhs-canary-chart\/mhs\/values.yaml<\/code> and replace <code>tag: 1.1.1<\/code> with <code>tag: 1.1.2<\/code> (<a href=\"https:\/\/github.com\/fabianpiau\/mhs-canary-chart\/blob\/master\/mhs\/values.yaml#L9\" target=\"_blank\" title=\"Line to update\" rel=\"noopener noreferrer\">this line<\/a>).<\/p>\n<p>Then:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">cd<\/span> mhs-canary-chart<br \/>helm upgrade mhs --namespace application .\/mhs<br \/><\/div>\n\n<p>While the canary deployment is in progress, it&#8217;s very important to generate some traffic to MHS. Without traffic, Flagger will consider that something went wrong with the new version and will rollback automatically to the previous one. Obviously, you don&#8217;t need this extra step in a production environment that continuously receives real traffic.<\/p>\n<p>Run this loop command in another terminal to generate artificial traffic:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">while<\/span> (true)<span class=\"wp-shkshell-special\">;<\/span> <span class=\"wp-shkshell-command\">do<\/span> curl -I -H Host:mhs.example.com <span class=\"wp-shkshell-string\">'http:\/\/localhost'<\/span> <span class=\"wp-shkshell-special\">;<\/span> <span class=\"wp-shkshell-command\">sleep<\/span> 0.5 <span class=\"wp-shkshell-special\">;<\/span> <span class=\"wp-shkshell-command\">done<\/span><br \/><\/div>\n\n<p>Check the Kube dashboard, you should see the canary pod with the new version <code>1.1.2<\/code> at some point:<\/p>\n<div style=\"max-width: 560px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/post\/00096\/mhs-1.1.2-canary-deployment-in-progress-new.png?ssl=1\" rel=\"shadowbox[sbpost-5131];player=img;\" title=\"Canary deployment of MHS 1.1.2 in progress in your cluster\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/post\/00096\/mhs-1.1.2-canary-deployment-in-progress-new-thumbnail.png?resize=550%2C315&#038;ssl=1\" alt=\"Canary deployment of MHS 1.1.2 in progress in your cluster\" title=\"Canary deployment of MHS 1.1.2 in progress in your cluster\" width=\"550\" height=\"315\" class=\"size-medium wp-image-257\" \/><\/a><p class=\"wp-caption-text\">Canary deployment of MHS 1.1.2 in progress in your cluster<\/p><\/div>\n<p>Check the canary events with the same command as before:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">kubectl<\/span> -n application describe canary\/mhs<br \/><\/div>\n\n<p>After a while (about 6 minutes) you should have a similar event output:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">Events<\/span>:<br \/>Type     Reason  Age                From     Message<br \/>----     ------  ----               ----     -------<br \/>Warning  Synced  30m                flagger  mhs-primary.application not ready: waiting for rollout to finish: observed deployment generation less then desired generation<br \/>Normal   Synced  29m (x2 over 30m)  flagger  all the metrics providers are available!<br \/>Normal   Synced  29m                flagger  Initialization done! mhs.application<br \/>Normal   Synced  10m                flagger  New revision detected! Scaling up mhs.application<br \/>Normal   Synced  9m16s              flagger  Starting canary analysis for mhs.application<br \/>Normal   Synced  9m16s              flagger  Advance mhs.application canary weight 10<br \/>Normal   Synced  8m16s              flagger  Advance mhs.application canary weight 20<br \/>Normal   Synced  7m16s              flagger  Advance mhs.application canary weight 30<br \/>Normal   Synced  6m16s              flagger  Advance mhs.application canary weight 40<br \/>Normal   Synced  5m16s              flagger  Advance mhs.application canary weight 50<br \/>Normal   Synced  4m16s              flagger  Copying mhs.application template spec to mhs-primary.application<br \/>Normal   Synced  3m16s              flagger  Routing all traffic to primary<br \/>Normal   Synced  2m16s              flagger  (combined from similar events): Promotion completed! Scaling down mhs.application<br \/><\/div>\n\n<p>The canary release performed successfully. Now you have version <code>1.1.2<\/code> installed on all the primary pods and the canary pod has been removed.<\/p>\n<div style=\"max-width: 560px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/post\/00096\/mhs-1.1.2-deployed-new.png?ssl=1\" rel=\"shadowbox[sbpost-5131];player=img;\" title=\"MHS 1.1.2 is deployed in your cluster\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/post\/00096\/mhs-1.1.2-deployed-new-thumbnail.png?resize=550%2C315&#038;ssl=1\" alt=\"MHS 1.1.2 is deployed in your cluster\" title=\"MHS 1.1.2 is deployed in your cluster\" width=\"550\" height=\"315\" class=\"size-medium wp-image-257\" \/><\/a><p class=\"wp-caption-text\">MHS 1.1.2 is deployed in your cluster<\/p><\/div>\n<blockquote><p>\nWhy did this deployment take about 6 minutes? Because it includes a 5 minutes canary analysis. During this analysis, the traffic was routed progressively to the canary pod. The canary traffic increased by steps of 10% every 1 minute until it reached 50% of the global traffic. The analysis is configurable and defined in the <a href=\"https:\/\/github.com\/fabianpiau\/mhs-canary-chart\/blob\/master\/mhs\/templates\/canary.yaml\" target=\"_blank\" title=\"Canary resource\" rel=\"noopener noreferrer\">canary.yaml file<\/a> that was added to the chart.\n<\/p><\/blockquote>\n<p>Below is the analysis configuration:<\/p>\n<pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\r\n  analysis:\r\n    # stepper schedule interval\r\n    interval: 1m\r\n    # max traffic percentage routed to canary - percentage (0-100)\r\n    maxWeight: 50\r\n    # canary increment step - percentage (0-100)\r\n    stepWeight: 10\r\n    # max number of failed metric checks before rollback (global to all metrics)\r\n    threshold: 5\r\n    metrics:\r\n      - name: request-success-rate\r\n        # percentage before the request success rate metric is considered as failed (0-100)\r\n        thresholdRange:\r\n          min: 99\r\n        # interval for the request success rate metric check\r\n        interval: 30s\r\n      - name: request-duration\r\n        # maximum req duration P99 in milliseconds before the request duration metric is considered as failed\r\n        thresholdRange:\r\n          max: 500\r\n        # interval for the request duration metric check\r\n        interval: 30s\r\n<\/pre>\n<blockquote><p>\nThe canary analysis has been covered with the 2 basic metrics that are provided out of the box by Istio \/ Prometheus (request success rate + duration). It is possible to define your own custom metrics. In that case, they will need to be provided by your application. Your application will need to expose a Prometheus endpoint that includes your custom metrics. And you will be able to <a href=\"https:\/\/docs.flagger.app\/usage\/metrics#prometheus\" target=\"_blank\" title=\"Custom metrics in the canary analysis\" rel=\"noopener noreferrer\">update the Flagger analysis configuration to use them with your own PromQL query<\/a>. Note this goes beyond the scope of this hands-on guide that uses only the built-in metrics.\n<\/p><\/blockquote>\n<p><br clear=\"none\" \/><\/p>\n<h4>Experiment 2 &#8211; MHS v1.1.3 faulty deployment<\/h4>\n<p>Again, you need to manually edit the file <code>mhs-canary-chart\/mhs\/values.yaml<\/code> and replace <code>tag: 1.1.2<\/code> with <code>tag: 1.1.3<\/code>.<\/p>\n<p>Then:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">cd<\/span> mhs-canary-chart<br \/>helm upgrade mhs --namespace application .\/mhs<br \/><\/div>\n\n<p>We generate some artificial traffic:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">while<\/span> (true)<span class=\"wp-shkshell-special\">;<\/span> <span class=\"wp-shkshell-command\">do<\/span> curl -I -H Host:mhs.example.com <span class=\"wp-shkshell-string\">'http:\/\/localhost'<\/span> <span class=\"wp-shkshell-special\">;<\/span>  curl -I -H Host:mhs.example.com -H X-Mirror-Code:500 <span class=\"wp-shkshell-string\">'http:\/\/localhost'<\/span> <span class=\"wp-shkshell-special\">;<\/span> <span class=\"wp-shkshell-command\">sleep<\/span> 0.5 <span class=\"wp-shkshell-special\">;<\/span> <span class=\"wp-shkshell-command\">done<\/span><br \/><\/div>\n\n<blockquote><p>\nThis time, we also generate invalid traffic to make sure the request success rate is going down!\n<\/p><\/blockquote>\n<p>Check the canary events with the same command as before:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">kubectl<\/span> -n application describe canary\/mhs<br \/><\/div>\n\n<p>After a while (about 6 minutes) you should have a similar event output:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">Normal<\/span>   Synced  8m23s (x2 over 20m)  flagger  New revision detected! Scaling up mhs.application<br \/>Normal   Synced  7m23s (x2 over 19m)  flagger  Advance mhs.application canary weight 10<br \/>Normal   Synced  7m23s (x2 over 19m)  flagger  Starting canary analysis for mhs.application<br \/>Warning  Synced  6m23s                flagger  Halt mhs.application advancement success rate 57.14% <span class=\"wp-shkshell-special\"><<\/span> 99%<br \/>Warning  Synced  5m24s                flagger  Halt mhs.application advancement success rate 0.00% <span class=\"wp-shkshell-special\"><<\/span> 99%<br \/>Warning  Synced  3m24s                flagger  Halt mhs.application advancement success rate 71.43% <span class=\"wp-shkshell-special\"><<\/span> 99%<br \/>Warning  Synced  2m24s                flagger  Halt mhs.application advancement success rate 50.00% <span class=\"wp-shkshell-special\"><<\/span> 99%<br \/>Warning  Synced  84s                  flagger  Halt mhs.application advancement success rate 63.64% <span class=\"wp-shkshell-special\"><<\/span> 99%<br \/>Warning  Synced  24s                  flagger  Rolling back mhs.application failed checks threshold reached 5<br \/>Warning  Synced  24s                  flagger  Canary failed! Scaling down mhs.application<br \/><\/div>\n\n<p>And you are still on version <code>1.1.2<\/code>.<\/p>\n<blockquote><p>\nFlagger decided not to go ahead and propagate version <code>1.1.3<\/code> as it could not perform a successful analysis and the error threshold was reached, i.e. 5 times (indeed, each time, about 50% of the requests were ending up in an HTTP 500 response). Flagger has simply redirected all traffic back to the primary instances and removed the canary pod.\n<\/p><\/blockquote>\n<p>Congratulations, you&#8217;ve come to the end of this second tutorial!<\/p>\n<p><br clear=\"none\" \/><\/p>\n<h4>Observations<\/h4>\n<p>Before we clean up the resources we&#8217;ve created, let&#8217;s wrap up with a list of observations:<\/p>\n<ul>\n<li>Deleting a deployment will delete all pods (canary \/ primary). And we don&#8217;t end up with orphan resources.<\/li>\n<li>Prometheus is required. Without it, the canary analysis won&#8217;t work.<\/li>\n<li>It is not possible to re-trigger a canary deployment of the same version if it has just failed. It forces you to bump up the version (even if it was a configuration and not a code issue).<\/li>\n<li>Flagger off-boarding process is not as simple as removing the canary resource from the chart and deploy a new version. If you delete the canary resource then Flagger won&#8217;t trigger the canary process, it will change the version in <code>mhs<\/code> and remove <code>mhs-primary<\/code> but <code>mhs<\/code> has 0 pods so it will make your service unavailable! You need to be careful and adopt a proper manual off-boarding process. Recently, the Flagger team added a property <code>revertOnDeletion<\/code> you can enable to avoid this issue. You can read the documentation <a href=\"https:\/\/docs.flagger.app\/usage\/how-it-works#canary-finalizers\" target=\"_blank\" title=\"Flagger canary finalizer\" rel=\"noopener noreferrer\">to know more about this canary finalizer<\/a>.<\/li>\n<li>After multiple deployments, it seems that some events can be missing, the Kubernetes <code>describe<\/code> command is accumulating them (<code>x&lt;int&gt; over &lt;int&gt;m<\/code>) sometimes the order is not preserved and\/or some events are not showing up. You can look at the phase status (terminal status are <code>Initialized<\/code>, <code>Succeeded<\/code> and <code>Failed<\/code>). The best is to look directly at the logs on the Flagger pod as this is always accurate and complete.<\/li>\n<li>The canary analysis should be configured to run for a short period of time (i.e. no more than 30 minutes) to leverage continuous deployment and avoid releasing a new version while a canary deployment for the previous one is still in progress. If you want to perform canary releases over longer periods, Flagger may not be the best tool.<\/li>\n<li>Finally, it&#8217;s important to remember that the first time you deploy with Flagger (like in experiment 0 above), the tool needs to initialize itself (<code>Initialized<\/code> status) and will not perform any analysis.<\/li>\n<\/ul>\n<p><br clear=\"none\" \/><\/p>\n<h4>Cleaning up resources<\/h4>\n<p>Now the tutorial is complete you can remove the MHS application and its namespace.<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">helm<\/span> delete mhs --namespace application<br \/><span class=\"wp-shkshell-prompt\"><\/span> <br \/><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">kubectl<\/span> delete namespaces application<br \/><\/div>\n\n<p>We recommend that you leave Flagger and Istio in place to save time in the next tutorial. If however you&#8217;d like to remove everything now, then you can run the following commands.<\/p>\n<p>Remove Flagger:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">helm<\/span> delete flagger --namespace flagger-system<br \/><span class=\"wp-shkshell-prompt\"><\/span> <br \/><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">kubectl<\/span> delete namespaces flagger-system<br \/><\/div>\n\n<p>Remove Istio and Prometheus:<\/p>\n\n<div class=\"wp-shkshell\"><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">kubectl<\/span> delete -f https:\/\/raw.githubusercontent.com\/istio\/istio\/release-1.7\/samples\/addons\/prometheus.yaml<br \/><span class=\"wp-shkshell-prompt\"><\/span> <br \/><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">istioctl<\/span> manifest generate --set profile=demo <span class=\"wp-shkshell-special\">|<\/span> <span class=\"wp-shkshell-command\">kubectl<\/span> delete -f -<br \/><span class=\"wp-shkshell-prompt\"><\/span> <br \/><span class=\"wp-shkshell-prompt\"><\/span> <span class=\"wp-shkshell-command\">kubectl<\/span> delete namespaces istio-system<br \/><\/div>\n\n<p><br clear=\"none\" \/><\/p>\n<h4>What&#8217;s next?<\/h4>\n<p>The <a href=\"https:\/\/blog.fabianpiau.com\/en\/2020\/06\/28\/flagger-monitor-your-canary-deployments-with-grafana\/\" title=\"Flagger \u2013 Monitor your Canary deployments with Grafana\">next article<\/a> will focus on the <a href=\"https:\/\/grafana.com\/\" target=\"_blank\" title=\"Grafana website\" rel=\"noopener noreferrer\">Grafana dashboard<\/a> provided out of the box with Flagger which is a nice addition, so you don&#8217;t need to manually run any <code>kuberctl<\/code> commands to check the result of your canary deployments. Stay tuned! In the meantime, you can stop the Kubernetes cluster by unchecking the box and restarting Docker Desktop. Your computer deserves another break.<\/p>","protected":false},"excerpt":{"rendered":"<p>&nbsp;Version fran\u00e7aise disponible Update October, 17th, 2020 : Use newer versions (Helm 3, Kube 18, Istio 1.7, Flagger 1.2). This article is the second one of the series dedicated to Flagger. In a nutshell, Flagger is a progressive delivery tool that automates the release process for applications running on Kubernetes. It reduces the risk of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5126,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[110,292,289,291,290,288],"class_list":["post-5131","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-agile-programming","tag-cloud","tag-docker","tag-flagger","tag-helm","tag-istio","tag-kubernetes"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Flagger - Canary deployments on Kubernetes | CarmaBlog<\/title>\n<meta name=\"description\" content=\"&nbsp;English version available Mise \u00e0 jour 17 Octobre 2020 : Utilisation de versions plus r\u00e9centes (Helm 3, Kube 18, Istio 1.7, Flagger 1.2). Cet article\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.fabianpiau.com\/en\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Flagger - Canary deployments on Kubernetes | CarmaBlog\" \/>\n<meta property=\"og:description\" content=\"&nbsp;English version available Mise \u00e0 jour 17 Octobre 2020 : Utilisation de versions plus r\u00e9centes (Helm 3, Kube 18, Istio 1.7, Flagger 1.2). Cet article\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.fabianpiau.com\/en\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/\" \/>\n<meta property=\"og:site_name\" content=\"CarmaBlog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/fabian.piau\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/fabian.piau\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-19T18:56:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-01-14T14:58:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i2.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/2020\/05\/kubernetes-thumbnail.png?fit=300%2C300&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"300\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Fabian Piau\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fabianpiau\" \/>\n<meta name=\"twitter:site\" content=\"@fabianpiau\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fabian Piau\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"26 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blog.fabianpiau.com\\\/fr\\\/2020\\\/05\\\/19\\\/flagger-canary-deployments-on-kubernetes\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.fabianpiau.com\\\/fr\\\/2020\\\/05\\\/19\\\/flagger-canary-deployments-on-kubernetes\\\/\"},\"author\":{\"name\":\"Fabian Piau\",\"@id\":\"https:\\\/\\\/blog.fabianpiau.com\\\/#\\\/schema\\\/person\\\/c5cbffd7cf0b10117877f5dfd1b35f14\"},\"headline\":\"Flagger &#8211; Canary deployments on Kubernetes\",\"datePublished\":\"2020-05-19T18:56:08+00:00\",\"dateModified\":\"2021-01-14T14:58:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.fabianpiau.com\\\/fr\\\/2020\\\/05\\\/19\\\/flagger-canary-deployments-on-kubernetes\\\/\"},\"wordCount\":4099,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/blog.fabianpiau.com\\\/#\\\/schema\\\/person\\\/c5cbffd7cf0b10117877f5dfd1b35f14\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.fabianpiau.com\\\/fr\\\/2020\\\/05\\\/19\\\/flagger-canary-deployments-on-kubernetes\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/blog.fabianpiau.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/kubernetes-thumbnail.png?fit=300%2C300&ssl=1\",\"keywords\":[\"cloud\",\"docker\",\"flagger\",\"helm\",\"istio\",\"kubernetes\"],\"articleSection\":[\"Agile programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/blog.fabianpiau.com\\\/fr\\\/2020\\\/05\\\/19\\\/flagger-canary-deployments-on-kubernetes\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.fabianpiau.com\\\/en\\\/2020\\\/05\\\/19\\\/flagger-canary-deployments-on-kubernetes\\\/\",\"url\":\"https:\\\/\\\/blog.fabianpiau.com\\\/en\\\/2020\\\/05\\\/19\\\/flagger-canary-deployments-on-kubernetes\\\/\",\"name\":\"Flagger - Canary deployments on Kubernetes | CarmaBlog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.fabianpiau.com\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blog.fabianpiau.com\\\/en\\\/2020\\\/05\\\/19\\\/flagger-canary-deployments-on-kubernetes\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.fabianpiau.com\\\/fr\\\/2020\\\/05\\\/19\\\/flagger-canary-deployments-on-kubernetes\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/blog.fabianpiau.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/kubernetes-thumbnail.png?fit=300%2C300&ssl=1\",\"datePublished\":\"2020-05-19T18:56:08+00:00\",\"dateModified\":\"2021-01-14T14:58:54+00:00\",\"description\":\"&nbsp;English version available Mise \u00e0 jour 17 Octobre 2020 : Utilisation de versions plus r\u00e9centes (Helm 3, Kube 18, Istio 1.7, Flagger 1.2). Cet article\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.fabianpiau.com\\\/en\\\/2020\\\/05\\\/19\\\/flagger-canary-deployments-on-kubernetes\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[[\"https:\\\/\\\/blog.fabianpiau.com\\\/en\\\/2020\\\/05\\\/19\\\/flagger-canary-deployments-on-kubernetes\\\/\"]]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blog.fabianpiau.com\\\/en\\\/2020\\\/05\\\/19\\\/flagger-canary-deployments-on-kubernetes\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/blog.fabianpiau.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/kubernetes-thumbnail.png?fit=300%2C300&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/blog.fabianpiau.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/kubernetes-thumbnail.png?fit=300%2C300&ssl=1\",\"width\":300,\"height\":300,\"caption\":\"kubernetes\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.fabianpiau.com\\\/en\\\/2020\\\/05\\\/19\\\/flagger-canary-deployments-on-kubernetes\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Homepage\",\"item\":\"https:\\\/\\\/blog.fabianpiau.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Programmation agile\",\"item\":\"https:\\\/\\\/blog.fabianpiau.com\\\/en\\\/category\\\/agile-programming\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Flagger &#8211; D\u00e9ploiements Canary sur Kubernetes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog.fabianpiau.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/blog.fabianpiau.com\\\/en\\\/\",\"name\":\"CarmaBlog\",\"description\":\"Agility, Java programming, New technologies and more...\",\"publisher\":{\"@id\":\"https:\\\/\\\/blog.fabianpiau.com\\\/en\\\/#\\\/schema\\\/person\\\/c5cbffd7cf0b10117877f5dfd1b35f14\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blog.fabianpiau.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/blog.fabianpiau.com\\\/en\\\/#\\\/schema\\\/person\\\/c5cbffd7cf0b10117877f5dfd1b35f14\",\"name\":\"Fabian Piau\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/i0.wp.com\\\/blog.fabianpiau.com\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/fabian-pro-small.jpg?fit=567%2C667&ssl=1\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/blog.fabianpiau.com\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/fabian-pro-small.jpg?fit=567%2C667&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/blog.fabianpiau.com\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/fabian-pro-small.jpg?fit=567%2C667&ssl=1\",\"width\":567,\"height\":667,\"caption\":\"Fabian Piau\"},\"logo\":{\"@id\":\"https:\\\/\\\/i0.wp.com\\\/blog.fabianpiau.com\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/fabian-pro-small.jpg?fit=567%2C667&ssl=1\"},\"description\":\"Java developer, Fabian is interested in new technologies and their use within an Agile environment.\",\"sameAs\":[\"https:\\\/\\\/blog.fabianpiau.com\",\"https:\\\/\\\/www.facebook.com\\\/fabian.piau\",\"https:\\\/\\\/www.instagram.com\\\/fabianpiau\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/fabianpiau\\\/\",\"https:\\\/\\\/x.com\\\/fabianpiau\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Flagger - Canary deployments on Kubernetes | CarmaBlog","description":"&nbsp;English version available Mise \u00e0 jour 17 Octobre 2020 : Utilisation de versions plus r\u00e9centes (Helm 3, Kube 18, Istio 1.7, Flagger 1.2). Cet article","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.fabianpiau.com\/en\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/","og_locale":"en_US","og_type":"article","og_title":"Flagger - Canary deployments on Kubernetes | CarmaBlog","og_description":"&nbsp;English version available Mise \u00e0 jour 17 Octobre 2020 : Utilisation de versions plus r\u00e9centes (Helm 3, Kube 18, Istio 1.7, Flagger 1.2). Cet article","og_url":"https:\/\/blog.fabianpiau.com\/en\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/","og_site_name":"CarmaBlog","article_publisher":"https:\/\/www.facebook.com\/fabian.piau","article_author":"https:\/\/www.facebook.com\/fabian.piau","article_published_time":"2020-05-19T18:56:08+00:00","article_modified_time":"2021-01-14T14:58:54+00:00","og_image":[{"width":300,"height":300,"url":"https:\/\/i2.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/2020\/05\/kubernetes-thumbnail.png?fit=300%2C300&ssl=1","type":"image\/png"}],"author":"Fabian Piau","twitter_card":"summary_large_image","twitter_creator":"@fabianpiau","twitter_site":"@fabianpiau","twitter_misc":{"Written by":"Fabian Piau","Est. reading time":"26 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.fabianpiau.com\/fr\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/#article","isPartOf":{"@id":"https:\/\/blog.fabianpiau.com\/fr\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/"},"author":{"name":"Fabian Piau","@id":"https:\/\/blog.fabianpiau.com\/#\/schema\/person\/c5cbffd7cf0b10117877f5dfd1b35f14"},"headline":"Flagger &#8211; Canary deployments on Kubernetes","datePublished":"2020-05-19T18:56:08+00:00","dateModified":"2021-01-14T14:58:54+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.fabianpiau.com\/fr\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/"},"wordCount":4099,"commentCount":0,"publisher":{"@id":"https:\/\/blog.fabianpiau.com\/#\/schema\/person\/c5cbffd7cf0b10117877f5dfd1b35f14"},"image":{"@id":"https:\/\/blog.fabianpiau.com\/fr\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/2020\/05\/kubernetes-thumbnail.png?fit=300%2C300&ssl=1","keywords":["cloud","docker","flagger","helm","istio","kubernetes"],"articleSection":["Agile programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.fabianpiau.com\/fr\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.fabianpiau.com\/en\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/","url":"https:\/\/blog.fabianpiau.com\/en\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/","name":"Flagger - Canary deployments on Kubernetes | CarmaBlog","isPartOf":{"@id":"https:\/\/blog.fabianpiau.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.fabianpiau.com\/en\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/#primaryimage"},"image":{"@id":"https:\/\/blog.fabianpiau.com\/fr\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/2020\/05\/kubernetes-thumbnail.png?fit=300%2C300&ssl=1","datePublished":"2020-05-19T18:56:08+00:00","dateModified":"2021-01-14T14:58:54+00:00","description":"&nbsp;English version available Mise \u00e0 jour 17 Octobre 2020 : Utilisation de versions plus r\u00e9centes (Helm 3, Kube 18, Istio 1.7, Flagger 1.2). Cet article","breadcrumb":{"@id":"https:\/\/blog.fabianpiau.com\/en\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":[["https:\/\/blog.fabianpiau.com\/en\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/"]]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.fabianpiau.com\/en\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/#primaryimage","url":"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/2020\/05\/kubernetes-thumbnail.png?fit=300%2C300&ssl=1","contentUrl":"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/2020\/05\/kubernetes-thumbnail.png?fit=300%2C300&ssl=1","width":300,"height":300,"caption":"kubernetes"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.fabianpiau.com\/en\/2020\/05\/19\/flagger-canary-deployments-on-kubernetes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Homepage","item":"https:\/\/blog.fabianpiau.com\/en\/"},{"@type":"ListItem","position":2,"name":"Programmation agile","item":"https:\/\/blog.fabianpiau.com\/en\/category\/agile-programming\/"},{"@type":"ListItem","position":3,"name":"Flagger &#8211; D\u00e9ploiements Canary sur Kubernetes"}]},{"@type":"WebSite","@id":"https:\/\/blog.fabianpiau.com\/en\/#website","url":"https:\/\/blog.fabianpiau.com\/en\/","name":"CarmaBlog","description":"Agility, Java programming, New technologies and more...","publisher":{"@id":"https:\/\/blog.fabianpiau.com\/en\/#\/schema\/person\/c5cbffd7cf0b10117877f5dfd1b35f14"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.fabianpiau.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/blog.fabianpiau.com\/en\/#\/schema\/person\/c5cbffd7cf0b10117877f5dfd1b35f14","name":"Fabian Piau","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/2022\/08\/fabian-pro-small.jpg?fit=567%2C667&ssl=1","url":"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/2022\/08\/fabian-pro-small.jpg?fit=567%2C667&ssl=1","contentUrl":"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/2022\/08\/fabian-pro-small.jpg?fit=567%2C667&ssl=1","width":567,"height":667,"caption":"Fabian Piau"},"logo":{"@id":"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/2022\/08\/fabian-pro-small.jpg?fit=567%2C667&ssl=1"},"description":"Java developer, Fabian is interested in new technologies and their use within an Agile environment.","sameAs":["https:\/\/blog.fabianpiau.com","https:\/\/www.facebook.com\/fabian.piau","https:\/\/www.instagram.com\/fabianpiau\/","https:\/\/www.linkedin.com\/in\/fabianpiau\/","https:\/\/x.com\/fabianpiau"]}]}},"views":1896,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/blog.fabianpiau.com\/wp-content\/uploads\/2020\/05\/kubernetes-thumbnail.png?fit=300%2C300&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pbSHyl-1kL","_links":{"self":[{"href":"https:\/\/blog.fabianpiau.com\/en\/wp-json\/wp\/v2\/posts\/5131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.fabianpiau.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fabianpiau.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fabianpiau.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fabianpiau.com\/en\/wp-json\/wp\/v2\/comments?post=5131"}],"version-history":[{"count":0,"href":"https:\/\/blog.fabianpiau.com\/en\/wp-json\/wp\/v2\/posts\/5131\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.fabianpiau.com\/en\/wp-json\/wp\/v2\/media\/5126"}],"wp:attachment":[{"href":"https:\/\/blog.fabianpiau.com\/en\/wp-json\/wp\/v2\/media?parent=5131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fabianpiau.com\/en\/wp-json\/wp\/v2\/categories?post=5131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fabianpiau.com\/en\/wp-json\/wp\/v2\/tags?post=5131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}