<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vishal Patel on Medium]]></title>
        <description><![CDATA[Stories by Vishal Patel on Medium]]></description>
        <link>https://medium.com/@vishal1909?source=rss-c34276dc959c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*ugfCbTc34BWIB8tQIH-SAg.jpeg</url>
            <title>Stories by Vishal Patel on Medium</title>
            <link>https://medium.com/@vishal1909?source=rss-c34276dc959c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 19:47:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vishal1909/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Automated Canary Deployment (Flagger) using Istio in GKE — Part 3]]></title>
            <link>https://medium.com/@vishal1909/automated-canary-deployment-flagger-using-istio-in-gke-part-3-f3e8ba5da2d6?source=rss-c34276dc959c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3e8ba5da2d6</guid>
            <dc:creator><![CDATA[Vishal Patel]]></dc:creator>
            <pubDate>Mon, 26 Sep 2022 18:01:16 GMT</pubDate>
            <atom:updated>2022-09-26T18:01:16.809Z</atom:updated>
            <content:encoded><![CDATA[<h3>Automated Canary Deployment (Flagger) using Istio in GKE — Part 3</h3><p>In the earlier set of posts — <strong><em>Setup Istio on GKE and visualize using Kiali </em></strong><em>and </em><strong><em>Intro to various Deployment Strategies using Istio in GKE,</em></strong> we read about setting up Kubernetes cluster in GKE and installing Istio service mesh. We also enabled telemetry services such as Kiali, Grafana, Prometheus, and Jaeger. Later we deployed multiple versions of the node.js application and discussed various deployment strategies. We visualized and monitored their behavior at each stage using Kiali and Grafana.</p><p>In this last blog post of the series, we will talk about how we can automate the deployment using Flagger. Multiple deployment strategies can be automated using Flagger such as <strong>Canary Release</strong> (progressive traffic shifting), <strong>A/B Testing</strong> (HTTP headers and cookies traffic routing), <strong>Blue/Green</strong> (traffic switching), and <strong>Blue/Green Mirroring</strong> (traffic shadowing). For the scope of this blog, we will mainly focus on <strong>Canary Release.</strong></p><blockquote><em>What is </em><strong><em>Flagger</em></strong><em>? </em><a href="https://github.com/fluxcd/flagger"><em>Flagger</em></a><em> 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.</em></blockquote><p>Original Resource: <a href="https://docs.flagger.app/">https://docs.flagger.app/</a></p><blockquote><em>What is </em><strong><em>Canary Release</em></strong><em>? Flagger implements a control loop that gradually shifts traffic to the canary while measuring key performance indicators like HTTP requests success rate, requests average duration and pod health. Based on analysis of the KPIs, a canary is promoted or aborted.</em></blockquote><p>Original Resource: <a href="https://docs.flagger.app/usage/deployment-strategies#canary-release">https://docs.flagger.app/usage/deployment-strategies#canary-release</a></p><h3>Step 1 — Install Flagger on GKE Istio</h3><p>To install <strong>Flagger </strong>on GKE Istio, we need to run the following Kubernetes command:</p><pre>kubectl apply -k github.com/fluxcd/flagger//kustomize/istio</pre><p>We will be installing Flagger on the “istio-system” namespace. Several components specific to the Flagger get installed on executing the above command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qCNiOhKixA_gOQgVHDQmhw.png" /><figcaption>Successful Flagger Installation</figcaption></figure><p>To verify the successful installation of Flagger in Kubernetes, check the deployment status by running the following command:</p><pre>kubectl get deploy -n istio-system</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V8zpj85SxmsybVJ6C0lb8A.png" /><figcaption>Flagger Deployment In Ready State</figcaption></figure><h3>Step 1 a— Install Flagger Load Testing Service</h3><p>We also set up an additional load testing service to generate traffic during the Canary analysis.</p><p>Run the following command to create a load tester service and deployment on the “istio-system” namespace.</p><pre>kubectl apply -k https://github.com/fluxcd/flagger//kustomize/tester</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ODMjzk33MUbH-AlBEMjmHw.png" /><figcaption>Flagger Load Tester Service</figcaption></figure><h3>Step 2— Create Canary Resource</h3><p>The next step is to create a Canary resource for the “helloapi” deployment. It is assumed that you have a working GKE and istio setup based on the steps described in part-1 of this blog series. The source code for this blog post can be found on <a href="https://github.com/phoenixinfotech1984/hello-app">Github</a>. Run the following commands:</p><pre>kubectl apply -f part-3/canary.yaml<br>kubectl apply -f part-3/canary-metrics.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*pQz-ktN_5Um0TwkpANflQw.png" /><figcaption>Canary Resource Created for helloapi</figcaption></figure><p>Make sure that the Flagger has created all the Canary objects successfully.</p><pre>kubectl -n test describe canary/helloapi</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PwWEQn85ag-8AvBiHRY8Fg.png" /><figcaption>Canary Resource Initialized</figcaption></figure><pre>kubectl get svc -n test</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qfhLdzHcnkUL-Lae7sKzEw.png" /><figcaption>Primary and Canary Services for helloapi</figcaption></figure><p>Following is the illustration of the Flagger Canary process:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uH4vBVIRWbNeADRdENJTWQ.png" /><figcaption>Flagger Canary Process</figcaption></figure><h3>Step 3— Automated canary promotion: Success Scenario</h3><p>We will trigger a Canary deployment by updating the version of the helloapi deployment spec. To edit the deployment spec, please run the following command:</p><pre>kubectl edit deploy helloapi -n test</pre><p>Once the deployment spec opens in an editable format, change the version from “v1&quot; to “v2”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L5IjQzdVZgr6IsBgZNAOIg.png" /><figcaption>Edit helloapi deployment spec</figcaption></figure><p>Once the deployment spec is updated, you can notice that the Canary analysis kicks in and the new version starts getting promoted progressively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*npSbcmBuWyQSnVlYl2BQCA.png" /><figcaption>Progressive Canary Rollout</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fnm-63d3ZxmCutuzSkLlRw.png" /><figcaption>Traffic Splitting</figcaption></figure><h3>Step 4— Automated rollback: Failure Scenario</h3><p>In the next step, we will re-trigger a Canary deployment as shown in the previous step (Step 3), but only this time will we induce a lot of HTTP 500 errors in the newer version and see if Flagger pauses the rollout.</p><p>This step validates that when we are trying to rollout a new version of the application which is error-prone, Flagger automatically detects the errors and pauses the rollout, and rolls back to the older version of the application.</p><p>You can notice that the Canary release spec has a MetricTemplate which checks for the HTTP 500 error percentage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*T1sUV9tZ2mToGdi_RJCtQA.png" /><figcaption>MetricTemplate to check HTTP 500 error percentage</figcaption></figure><p>Now trigger the Canary deployment, exec into the flagger loadtester pod, and generate HTTP 500 errors</p><pre>kubectl -n test exec -it flagger-loadtester-xx-xx sh<br>watch curl <a href="http://helloapi-canary:5000/hello/500">http://helloapi-canary:5000/hello/500</a></pre><p>When the error reaches its threshold point during the canary analysis, the rollout fails and the traffic is routed back to the primary version of the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mkkcDtjYp4Z2PoKPEvdFzQ.png" /></figure><p>— Thank you for reading —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3e8ba5da2d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Intro to various Deployment Strategies using Istio in GKE — Part 2]]></title>
            <link>https://medium.com/@vishal1909/intro-to-various-deployment-strategies-using-istio-in-gke-part-2-fc5ab7eb4219?source=rss-c34276dc959c------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc5ab7eb4219</guid>
            <dc:creator><![CDATA[Vishal Patel]]></dc:creator>
            <pubDate>Mon, 26 Sep 2022 18:01:01 GMT</pubDate>
            <atom:updated>2022-09-26T18:24:45.423Z</atom:updated>
            <content:encoded><![CDATA[<h3>Intro to various Deployment Strategies using Istio in GKE — Part 2</h3><p>In our previous blog — <strong><em>Setup Istio on GKE and visualize using Kiali,</em></strong> we saw how to set up a Kubernetes cluster in GKE, and then we set up Istio service mesh, later we enabled various telemetry services such as Kiali, Grafana, Prometheus, and Jaeger. We then deployed a Node.js application into the Kubernetes cluster and configured it to be accessed via Istio. Finally, we visualized the whole setup through Kiali and Grafana.</p><p>In this blog post, we will discuss various deployment strategies we can incorporate using Istio. The following image is an illustration of Canary Release and Traffic Splitting using istio in Kubernetes that we would have accomplished at the end of this blog.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WG0jvAOdkOfER60FygS6qQ.png" /><figcaption>Architecture Diagram for Canary Release</figcaption></figure><p>Let&#39;s deploy the second version of the helloapi node.js application into the Kubernetes cluster. The relevant source code is hosted on <a href="https://github.com/phoenixinfotech1984/hello-app">Github</a>.</p><pre>kubectl apply -f part-2/deployment-canary.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1f3FgG16AYAHqUAYq62weA.png" /><figcaption>Version v2 deployment</figcaption></figure><p>We will define a <strong>destination rule</strong> to route the traffic based on various policies. Apply the destination rule using the following command.</p><pre>kubectl apply -f part-2/destination.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U0um9y4OIi9T-0CN2OwQYQ.png" /><figcaption>Applying Destination Rule</figcaption></figure><h3>Canary Rollout</h3><p>With two versions of the hello app deployed in a Kubernetes cluster (version v1 and v2), we can look at various deployment strategies.</p><h4>Subset/Version (Blue-Green)</h4><p>Following kubectl command needs to be applied to enable Subset/Version deployment</p><pre>kubectl apply -f part-2/virtualservice-bluegreen.yaml</pre><p>We can define a <strong><em>subset/version</em></strong> of a <strong><em>route destination</em></strong> in a virtual service that is identified with a <strong><em>reference</em></strong> to a <strong><em>named service subset</em></strong> defined in the <strong><em>Destination Rule</em></strong>.</p><p>For example, if the subset of the route destination is “<strong><em>stable”</em></strong>, it is identified with a reference service subset defined in the <strong><em>destination rule,</em></strong> and all HTTP traffic is routed to the pods of the helloapi service with the label “<strong><em>v1</em></strong>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*CPumMp08xHTrBzDhnfVdVQ.png" /><figcaption>HTTP traffic routed towards Stable version</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl0Fixb7jiwUj1Mrg4L%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fl0Fixb7jiwUj1Mrg4L&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl0Fixb7jiwUj1Mrg4L%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="251" frameborder="0" scrolling="no"><a href="https://medium.com/media/931dab824fdeba7f23b7b302887ef233/href">https://medium.com/media/931dab824fdeba7f23b7b302887ef233/href</a></iframe><p>In the second example, we changed the subset of the route destination to “<strong><em>canary”</em></strong>, so in this case, all HTTP traffic is routed to the pods of the <strong><em>helloapi</em></strong> service with the label “<strong><em>v2</em></strong>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*Q5aIu8857bLh5-vH7CJJHw.png" /><figcaption>HTTP traffic routed towards Canary version</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FJTDAN1uCnUJJTv2yX0%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FJTDAN1uCnUJJTv2yX0&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FJTDAN1uCnUJJTv2yX0%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="251" frameborder="0" scrolling="no"><a href="https://medium.com/media/75a46c2603756b7ac40a2cb28b3482cb/href">https://medium.com/media/75a46c2603756b7ac40a2cb28b3482cb/href</a></iframe><h4>Traffic splitting using Weight (Beta Testing)</h4><p>Following kubectl command needs to be applied to enable weight based traffic splitting</p><pre>kubectl apply -f part-2/virtualservice-weight.yaml</pre><p>We can split the HTTP traffic based on weight, a certain percentage of the traffic can be routed to the new release.</p><p>In the below example, based on the <strong><em>weight</em></strong> parameter 90% of the traffic is routed to the <strong><em>stable</em></strong> release and 10% percent of the traffic is routed to the <strong><em>canary</em></strong> release.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*m3DDk2mnBcx1JD-3V2Dddg.png" /><figcaption>Weight-based traffic routing</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FQWSOZV2D6B272ZQ3rd%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FQWSOZV2D6B272ZQ3rd&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FQWSOZV2D6B272ZQ3rd%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="251" frameborder="0" scrolling="no"><a href="https://medium.com/media/2edb479054a204f5c134dddc194b7947/href">https://medium.com/media/2edb479054a204f5c134dddc194b7947/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*akXnyq2CJh8JsCW9MnpnDw.png" /><figcaption>Grafana visualization of weight-based traffic splitting</figcaption></figure><p><strong>Header based traffic splitting (A/B testing)</strong></p><p>Following kubectl command needs to be applied to enable header-based traffic splitting</p><pre>kubectl apply -f part-2/virtualservice-header.yaml</pre><p>We can split the HTTP traffic based on the header parameters defined in the request.</p><p>In the following example, a subset of the route destination is decided based on the header parameter “<strong><em>end-user</em></strong>”. If the request has a header “end-user” set to “<strong><em>phoenix-user</em></strong>” the traffic is routed to a <strong><em>canary</em></strong> release, if not it is routed to a <strong><em>stable </em></strong>release</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*rKQ6Dio6hy-ZZSu0AYvvPw.png" /><figcaption>Split HTTP traffic based on the request header</figcaption></figure><p><strong>Note</strong>: We have used a chrome extension — <a href="https://chrome.google.com/webstore/detail/modheader/idgpnmonknjnojddfkpgkljpfnnfcklj?hl=en">ModHeader</a> to add headers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*esM0twaWLDEGrY9fwHBlSA.png" /><figcaption>Header end-user set to phoenix-user</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C9JCoGIx6OtmwLRhxrvFiQ.png" /><figcaption>No header set</figcaption></figure><p>Another example to split the traffic based on the header is to detect the browser from which the request is received.</p><p>Following kubectl command needs to be applied to enable header-based traffic splitting</p><pre>kubectl apply -f part-2/virtualservice-browser.yaml</pre><p>If the<strong><em> user-agent </em></strong>is a <strong><em>firefox</em></strong> browser, the request is routed to a <strong><em>Stable</em></strong> version. If not the request is routed to the <strong><em>Canary</em></strong> release</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*9YyQP7i538Y3rTYip7dV8Q.png" /><figcaption>Browser-based traffic splitting</figcaption></figure><h3>Handling Failures</h3><p>Istio helps to improve the reliability and availability of the services in the mesh. The deployment strategy helps handle service failures and take appropriate fallback actions.</p><p>For instance, when we deployed a new version of the hello app and it errored out for some reason. We can immediately roll back the new deployment by diverting all network traffic to the older version.</p><p>Following kubectl command needs to be applied to enable the previous deployment</p><pre>kubectl apply -f part-2/virtualservice-rollback.yaml</pre><p>The above command sets the <strong><em>subset/version</em></strong> of a <strong><em>route destination </em></strong>to <strong><em>Stable </em></strong>assuming the current subset value is set to <strong><em>Canary.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*CPumMp08xHTrBzDhnfVdVQ.png" /><figcaption>HTTP traffic routed towards Stable version</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FLmxrpFZA8vjCJYQS2S%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FLmxrpFZA8vjCJYQS2S&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FLmxrpFZA8vjCJYQS2S%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="251" frameborder="0" scrolling="no"><a href="https://medium.com/media/7074f8f9b198628b89a1f5bce8eea159/href">https://medium.com/media/7074f8f9b198628b89a1f5bce8eea159/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K75xxauoQkGDbQKU-YBOYg.png" /><figcaption>Grafana visualization of service request</figcaption></figure><p>This will increase the reliability of the service and keep the service available at all times.</p><p>— Thank you for reading —</p><p>Please read our next article regarding <a href="https://medium.com/@vishal1909/automated-canary-deployment-flagger-using-istio-in-gke-part-3-f3e8ba5da2d6"><strong><em>Automated Canary Deployment (Flagger) using Istio in GKE</em></strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc5ab7eb4219" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup Istio on GKE and visualize using Kiali — Part 1]]></title>
            <link>https://medium.com/@vishal1909/setup-istio-on-gke-and-visualize-using-kiali-part-1-d542fa8da921?source=rss-c34276dc959c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d542fa8da921</guid>
            <dc:creator><![CDATA[Vishal Patel]]></dc:creator>
            <pubDate>Mon, 26 Sep 2022 18:00:48 GMT</pubDate>
            <atom:updated>2022-09-26T18:22:20.017Z</atom:updated>
            <content:encoded><![CDATA[<h3>Setup Istio on GKE and visualize using Kiali — Part 1</h3><p>In this article, we will look at the steps to set up a <strong><em>Kubernetes Cluster</em></strong> in <strong><em>GKE</em></strong>, and run <strong><em>Istio</em></strong> on <strong><em>Kubernetes Cluster.</em></strong> We will also touch upon enabling <strong><em>Istio telemetry</em></strong> services for observability of service behavior.</p><blockquote><em>What is </em><strong><em>GKE</em></strong><em>? Google Kubernetes Engine (also known as </em><strong><em>GKE</em></strong><em>) is a cluster manager and orchestration system for running Docker containers in the cloud. It is a production-ready environment with guaranteed uptime, load balancing and included container networking features.</em></blockquote><p>Original Resource: <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/kubernetes-engine-overview">https://cloud.google.com/kubernetes-engine/docs/concepts/kubernetes-engine-overview</a></p><blockquote><em>What is </em><strong><em>Istio</em></strong><em>? Istio helps reduce the complexity of the deployments and eases the strain on your development teams. It is a completely open-source service mesh that layers transparently onto existing distributed applications. It is also a platform, including APIs that let it integrate into any logging platform, or telemetry or policy system. Istio’s diverse feature set lets you successfully, and efficiently, run a distributed microservice architecture, and provides a uniform way to secure, connect, and monitor microservices.</em></blockquote><p>Original Resource: <a href="https://istio.io/">https://istio.io/</a></p><h3>Step 1 — Setup Kubernetes Cluster in GKE</h3><p>With the free credits offered by Google, we created a GKE instance using the ‘standard cluster’ template.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xNTUWkASR7Dr2Ytj" /><figcaption>Choose to configure GKE Standard cluster template</figcaption></figure><p>Specify the basic cluster information such as name, version, and location of your choice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*q7pAYvxpr-TifUed" /><figcaption>Basic Cluster Information</figcaption></figure><p>Keep the default pool size to ‘3 nodes’<strong> </strong>and to run the workloads choose the low cost ‘N1’ series machine with the ‘n1-standard-2’ machine type. We have chosen a machine type with higher CPU capabilities than what is offered by default to support all the services we shall be deploying in this demo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F9UN3D3AneizsbulIWqQVw.png" /><figcaption>Machine Configuration for Nodes</figcaption></figure><p>Keeping all the remaining default template configurations as it is, click the “Create” button. GKE takes a couple of minutes to set up the Cluster, on successful creation of the cluster, you will see a similar screen shown below with all the prescribed configurations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*i9Hd_J-VQMt35Juh" /></figure><p>We can connect to the Kubernetes cluster either from the integrated google cloud console or using gcloud CLI from our laptop with the connection string.</p><p>We chose the laptop approach and installed the <a href="https://cloud.google.com/sdk/docs/install">gcloud CLI</a> locally, authenticated with the relevant GCP account, set the default project to the current one, and then downloaded the kubeconfig of the “phoenix-demo-cluster”.</p><pre>gcloud container clusters get-credentials &lt;cluster_name&gt; --zone &lt;preferred zone&gt; --project &lt;project_name&gt;</pre><p>Once the kubeconfig is downloaded, we can check the readiness of the nodes using the Kubectl command. Before executing the following command please install the <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/">kubectl CLI</a> on your local machine.</p><pre>kubectl get nodes</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FgT3z6lWZOxh4XfYOLzLyw.png" /><figcaption>Kubernetes Cluster Nodes</figcaption></figure><h3>Step 2 — Install Istio on Kubernetes Cluster and Enable Telemetry</h3><p>As a prerequisite to this step, you need to download and install <strong><em>Istio </em></strong>on your local machine.</p><p>Run the following command to download Istio to your machine.</p><pre>curl -L <a href="https://istio.io/downloadIstio">https://istio.io/downloadIstio</a> | ISTIO_VERSION=1.13.3 TARGET_ARCH=x86_64 sh -</pre><p>Move to the Istio package directory</p><pre>cd istio-1.13.3</pre><p>Add the istioctl client to your path (Linux or macOS)</p><pre>export PATH=$PWD/bin:$PATH</pre><p>Next, install Istio with the ‘demo’ configuration. We have chosen a demo configuration for this blog but feel free to choose other available configuration options.</p><pre>istioctl install --set profile=demo -y</pre><blockquote>Istio integrates with <a href="https://istio.io/latest/docs/ops/integrations">several</a> different telemetry applications. These can help you gain an understanding of the structure of your service mesh, display the topology of the mesh, and analyse the health of your mesh.</blockquote><blockquote><em>Original Resource: </em><a href="https://istio.io/">https://istio.io/</a></blockquote><p>Run the following commands to enable the Kiali dashboard and other <strong><em>Telemetry services </em></strong>such as Grafana, Prometheus, and Jaeger.</p><pre>kubectl apply -f samples/addons<br>kubectl rollout status deployment/kiali -n istio-system</pre><p>Upon successful installation, we can check the readiness of the <strong><em>Istio-related</em></strong> <strong><em>pods under</em></strong> the namespace “<strong><em>istio-system</em></strong>”. Run the following kubectl command to check the same.</p><pre>kubectl get pods -n istio-system</pre><h3>Step 3a — Deploy a Node.js app in Kubernetes Cluster</h3><p>As a prerequisite to this step, we will create a separate <strong><em>namespace</em></strong> for our application called “<strong><em>test</em></strong>”.</p><pre>kubectl create namespace test</pre><p>We Label the “test” namespace with istio-injection=enabled to enable A<a href="https://istio.io/docs/setup/additional-setup/sidecar-injection/#automatic-sidecar-injection">utomatic sidecar injection</a></p><pre>kubectl label namespace test istio-injection=enabled</pre><p>To view the istio-injection namespace, we execute the following command.</p><pre>kubectl get ns -L istio-injection</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GmP-YeH9THVUtzEr.png" /><figcaption>Create a new namespace</figcaption></figure><p>Next, clone the source code from the <a href="https://github.com/phoenixinfotech1984/hello-app">Github</a> repository. We will deploy a simple helloapi node.js application into the Kubernetes cluster.</p><pre>kubectl apply -f part-1/deployment.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bVeJsvw1QFXmYLVz.png" /><figcaption>Deployment of hello API</figcaption></figure><h3>Step 3b — Accessing Node.js app through istio</h3><p>We have to configure the istio ingress gateway and create a virtual service with the host: <strong><em>helloapp.phoenix.com</em></strong>, to access the Node.js application deployed in the previous step.</p><pre>kubectl apply -f part-1/gateway.yaml<br>kubectl apply -f part-1/virtualservice.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_ArZ_UkVWNVhqbYH.png" /><figcaption>Virtual service and Gateway creation</figcaption></figure><p>On successfully applying the <strong><em>gateway</em></strong> and the <strong><em>virtual service</em></strong>, the node.js app can be accessed from the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/0*Wx8WbuTb3Vi__OXk.png" /></figure><p>Connection successfully established with the API</p><p><strong>Note</strong>: Map “helloapp.phoenix.com” host to External IP in your host file. And to get the external IP run the following command.</p><pre>kubectl get svc istio-ingressgateway -n istio-system</pre><p>The service mesh can be visualized in both Kiali and Grafana dashboards.</p><pre>istioctl dashboard kiali</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gY0ZRUWSx6fD9J_t.png" /><figcaption>Kiali Dashboard</figcaption></figure><pre>istioctl dashboard grafana</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bsAkbWxlHQ7TlZiM.png" /><figcaption>Grafana Dashboard</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FTEhoBew9zfvvaYSO2y%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FTEhoBew9zfvvaYSO2y&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FTEhoBew9zfvvaYSO2y%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="251" frameborder="0" scrolling="no"><a href="https://medium.com/media/729bba0395f8fe6ac78c5e8bee67e30f/href">https://medium.com/media/729bba0395f8fe6ac78c5e8bee67e30f/href</a></iframe><p>So far we have set up a Kubernetes cluster in GKE, installed Istio, and enabled various telemetry services such as Kiali, Grafana, Prometheus, and Jaeger. Then we deployed a Node.js application into the Kubernetes cluster and configured it to be accessed via Istio. Finally, we visualized the whole setup through Kiali and Grafana.</p><p>— Thank you for reading —</p><p>Please read our next article — <a href="https://medium.com/@vishal1909/intro-to-various-deployment-strategies-using-istio-in-gke-part-2-fc5ab7eb4219"><strong><em>Intro to various Deployment Strategies using Istio in GKE</em></strong></a><strong><em>, </em></strong>which is a continuation of this blog</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d542fa8da921" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to handle Partial Content in Node.js]]></title>
            <link>https://medium.com/@vishal1909/how-to-handle-partial-content-in-node-js-8b0a5aea216?source=rss-c34276dc959c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b0a5aea216</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[video-streaming-server]]></category>
            <category><![CDATA[node-for-begginners]]></category>
            <category><![CDATA[node-js-tutorial]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Vishal Patel]]></dc:creator>
            <pubDate>Sun, 12 Jan 2020 17:03:23 GMT</pubDate>
            <atom:updated>2020-01-12T17:03:23.725Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*DRFSrjfk0L9PtKEYuNNS4Q.png" /></figure><p>In this post, I would like to talk about how to handle <strong>Range</strong> request and step by step implementation with Node.js.</p><p>This mechanism is widely used in streaming a video file and supported by most browsers.</p><p>Let’s discuss the header parameters in such requests.</p><p><strong>Accept-Ranges: bytes</strong></p><p>This is the header that is sent by the server. The <strong>Accept-Ranges</strong> response HTTP header is a marker used by the server to advertise its support of partial requests. For more info go to this <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Ranges"><em>link</em></a>.</p><p><strong>Range: bytes=(start)-(end)</strong></p><p>The <strong>Range</strong> HTTP request header indicates the part of a document that the server should return. Several parts can be requested with one Range header at once, and the server may send back these ranges in a multipart document. If the server sends back ranges, it uses the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206">206</a> Partial Content for the response. If the ranges are invalid, the server returns the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/416">416</a> Range Not Satisfiable error. The server can also ignore the Range header and return the whole document with a <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200">200</a> status code. For more info go to this <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range"><em>link</em></a>. <strong><em>Example : Range: bytes=0–1023</em></strong></p><p><strong>Content-Range: bytes (start)-(end)/(total)</strong></p><p>Content-Range is used in the response, to indicate which bytes the server is giving you (which may be different than the range you requested), as well as how long the entire content is (if known). For more info go to this <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range"><em>link</em></a>. <strong><em>Example: Content-Range: bytes 0–1023/2048</em></strong></p><h4><strong>Let’s see how Server handles multiple range requests received from the browser</strong></h4><p>In this example we assume the file size to be 2048 bytes long.</p><p>Requesting only first 1024 byte</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*D-C9idzcispno50DKln3cw.png" /><figcaption>Requesting only first 1024 byte</figcaption></figure><p>Browser not sending<strong> end</strong> value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*OQFuNexfuUlfgJOVqUmTQg.png" /><figcaption>Browser not sending <strong>end</strong> value</figcaption></figure><p>Request for the last 256 bytes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*7vX0c_o8vSqU74TfC4cpVQ.png" /><figcaption>Request for the last 256 bytes</figcaption></figure><p>Request with unavailable ranges</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*SNpUoGvhPE7KTRHJkwWMFg.png" /><figcaption>Return 416 for Unavailable Ranges</figcaption></figure><h3>Implementation in Node JS</h3><p>Create a basic HTTP server</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*9bQlHI5Sr62zvxA8fZCaiA.png" /><figcaption>Create Basic HTTP Server</figcaption></figure><p>Take sample video file and define <strong>createReadStream(Readable stream to read the file)</strong> and <strong>stat(to get file info)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*g_A2gAqyGO-qdUqtk-QX-g.png" /><figcaption>The main Variable defined</figcaption></figure><blockquote><strong>Promisify</strong> is a function that we can use to convert callback function into promises.</blockquote><blockquote><strong>A pipeline</strong> is a module method to pipe between streams forwarding errors and properly cleaning up and provide a callback when the pipeline is complete.</blockquote><p><strong>CreateReadStream</strong> reads the video file and sends a chunk to <strong>res</strong>(Writeable Stream) using the <strong>pipeline</strong> module.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*9rjmsJx0b52wNYljqUz3WA.png" /><figcaption>Sending Response</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*NUIadnKwsm5yPne6jlL8nw.png" /><figcaption>ReadStream to WriteStream using pipeline</figcaption></figure><p>This portion of code will only stream video on browser but can not handle range requests.</p><p>let us see how to handle the range requests.</p><p>In the below code, I am checking the range header exists or not. if the range header is available then extract <strong>start</strong> and <strong>end</strong> value. With every new request from the client, the value of start and end is changing to get the next chunk of video. <strong>HTTP code 206</strong> is set in response header to send only a newly made stream(a chunk of video).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*7gimTgMEa1Xm77lxvoRErQ.png" /><figcaption>Extract start-end value from Range Headers</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*K42dQACGdDpYATPjArDrSQ.png" /><figcaption>Handling Unavailable range request</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*_NV2PGWOi4KWYNXk-CFUvw.png" /><figcaption>Sending Partial Content with HTTP Code 206</figcaption></figure><p>— Thank you for reading —</p><p>you can find full source code on <a href="https://github.com/phoenixinfotech1984/node-content-range">GitHub</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b0a5aea216" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Canary Deployment and Traffic Splitting using Istio in Google Kubernetes Engine — Part 1]]></title>
            <link>https://medium.com/@vishal1909/canary-deployment-and-traffic-splitting-using-istio-in-google-kubernetes-engine-part-1-bf12ef098c52?source=rss-c34276dc959c------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf12ef098c52</guid>
            <category><![CDATA[google-kubernetes-engine]]></category>
            <category><![CDATA[canary-release]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[istio]]></category>
            <category><![CDATA[kiali]]></category>
            <dc:creator><![CDATA[Vishal Patel]]></dc:creator>
            <pubDate>Tue, 31 Dec 2019 10:30:54 GMT</pubDate>
            <atom:updated>2019-12-31T11:26:06.931Z</atom:updated>
            <content:encoded><![CDATA[<h3>Canary Deployment and Traffic Splitting using Istio in Google Kubernetes Engine — Part 1</h3><p>In this article, we will look at the steps to set up a <strong><em>Kubernetes Cluster</em></strong> in <strong><em>GKE</em></strong>, and run <strong><em>Istio</em></strong> on <strong><em>Kubernetes Cluster.</em></strong> We will also touch upon enabling <strong><em>Istio telemetry</em></strong> services for observability of service behavior.</p><p>We will also look into <strong><em>Canary rollout</em></strong> and analyze how to split the traffic using various <strong><em>deployment strategies. </em></strong>We will talk a little about how to use the Canary release in a way to perform <strong><em>A/B testing</em></strong>.</p><blockquote>What is <strong>GKE</strong>? Google Kubernetes Engine (also known as <strong>GKE</strong>) is a cluster manager and orchestration system for running Docker containers in the cloud. It is a production-ready environment with guaranteed uptime, load balancing and included container networking features.</blockquote><p>Original Resource: <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/kubernetes-engine-overview">https://cloud.google.com/kubernetes-engine/docs/concepts/kubernetes-engine-overview</a></p><blockquote>What is <strong>Istio</strong>? Istio helps reduce the complexity of the deployments and eases the strain on your development teams. It is a completely open-source service mesh that layers transparently onto existing distributed applications. It is also a platform, including APIs that let it integrate into any logging platform, or telemetry or policy system. Istio’s diverse feature set lets you successfully, and efficiently, run a distributed microservice architecture, and provides a uniform way to secure, connect, and monitor microservices.</blockquote><p>Original Resource: <a href="https://istio.io/">https://istio.io/</a></p><blockquote>What is <strong>Canary Release</strong>? Canary release is a technique to reduce the risk of introducing a new software version in production by slowly rolling out the change to a small subset of users before rolling it out to the entire infrastructure and making it available to everybody.</blockquote><p><em>Original Resource: </em><a href="https://martinfowler.com/bliki/CanaryRelease.html"><em>https://martinfowler.com/bliki/CanaryRelease.html</em></a></p><p>The following image shows what we’re trying to achieve in terms of Canary Release and Traffic Splitting using istio in Kubernetes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WG0jvAOdkOfER60FygS6qQ.png" /><figcaption>Architecture Diagram for Canary Release</figcaption></figure><h3>Step 1 — Setup Kubernetes Cluster in GKE</h3><p>With the free credits offered by Google, we created a GKE instance using the ‘standard cluster’ template.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Yd14LFtTiybVhCN-YHTYg.png" /><figcaption>GKE Standard Cluster Template</figcaption></figure><p>The only configuration we changed was the Node pools, where we added a higher memory CPU than the default option offered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*o8QNTraGRvDJ8m8K-qCg5A.png" /><figcaption>Node Pools Configuration</figcaption></figure><p>After verifying all the default template configurations, click the “Create” button. GKE takes couple of minutes to set up the Cluster, on successful creation of the cluster, you will see a similar screen shown below with all the prescribed configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*toXfYfHg0euPVa8KXB13QQ.png" /><figcaption>Active Kubernetes Cluster with 3 nodes</figcaption></figure><p>We can connect to the Kubernetes cluster either from the integrated google cloud console or using gcloud CLI from our laptop with the connection string.</p><p>We chose the laptop approach and installed the gcloud CLI locally and downloaded the kubeconfig of the “phoenix-cluster”.</p><pre>gcloud container clusters get-credentials &lt;cluster_name&gt; -zone &lt;preferred zone&gt; -project &lt;project_name&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rq7s7nM8xEcDs1FnC14S_A.png" /><figcaption>download kubeconfig of “phoenix-cluster” to laptop</figcaption></figure><p>Once the kubeconfig is downloaded, we can check the readiness of the nodes using the Kubectl command. Before executing the following command install the <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/">kubectl CLI</a> in your local machine.</p><pre>kubectl get nodes</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kfD76bsqev5tPE0jhfNdpA.png" /><figcaption>3 nodes defined in the Kubernetes cluster</figcaption></figure><h3>Step 2 — Install Istio on Kubernetes Cluster and Enable Telemetry</h3><p>As a prerequisite to this step, you need to download <strong><em>Istio </em></strong>in your local machine.</p><pre>curl -L <a href="https://istio.io/downloadIstio">https://istio.io/downloadIstio</a> | sh -; cd istio-1.4.2</pre><pre>export PATH=/Users/vishal/gryffindor/google-cloud-sdk/bin:$PATH</pre><p>Istio provides an Observability console in the form of <strong><em>Kiali.</em></strong></p><blockquote>Kiali helps understand the structure of your service mesh by inferring the topology, and also provides the health of your mesh.</blockquote><blockquote>Original Resource: <a href="https://kiali.io/">https://kiali.io/</a></blockquote><p>To access the Kiali dashboard, we need to create a secret in our Istio namespace with the credentials that we would input for authentication. The following command needs to be executed in sequence to achieve the same.</p><pre>KIALI_USERNAME=$(read -p ‘Kiali Username: ‘ uval &amp;&amp; echo -n $uval | base64)<br>KIALI_PASSPHRASE=$(read -sp ‘Kiali Passphrase: ‘ pval &amp;&amp; echo -n $pval | base64)</pre><pre>cat &lt;&lt;EOF | kubectl apply -f -<br>apiVersion: v1<br>kind: Secret<br>metadata:<br> name: kiali<br> namespace: istio-system<br> labels:<br> app: kiali<br>type: Opaque<br>data:<br> username: $KIALI_USERNAME<br> passphrase: $KIALI_PASSPHRASE<br>EOF</pre><p>Once the prerequisites are fulfilled, we have to run the following command which will <strong><em>install</em></strong> <strong><em>Istio on the Kubernetes cluster</em></strong> and <strong><em>enable Telemetry services</em></strong> such as Grafana, Prometheus, Jaeger, and Kiali.</p><pre>istioctl manifest apply — set values.kiali.enabled=true — set values.tracing.enabled=true — set values.grafana.enabled=true — set &quot;values.kiali.dashboard.jaegerURL=<a href="http://jaeger-query:16686/">http://jaeger-query:16686</a>&quot; — set &quot;values.kiali.dashboard.grafanaURL=<a href="http://grafana:3000/">http://grafana:3000</a>&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9EdbS9lk4K6VS5s-vY1eQg.png" /><figcaption>Installing Istio into Kubernetes</figcaption></figure><p>Upon successful installation we can check the readiness of the <strong><em>Istio</em></strong> related <strong><em>pods</em></strong> under the namespace “<strong><em>istio-system</em></strong>”. Run the following kubectl command to check the same.</p><pre>kubectl get pods -n istio-system</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9EdbS9lk4K6VS5s-vY1eQg.png" /><figcaption>Istio pods running on Kubernetes Cluster</figcaption></figure><h3>Step 3a — Deploy a Node.js app in Kubernetes Cluster</h3><p>As a prerequisite to this step, we will create a separate <strong><em>namespace</em></strong> for our application called “<strong><em>test</em></strong>”.</p><pre>kubectl create namespace test</pre><p>We Label the “test” namespace with istio-injection=enabled to enable A<a href="https://istio.io/docs/setup/additional-setup/sidecar-injection/#automatic-sidecar-injection">utomatic sidecar injection</a></p><pre>kubectl label namespace test istio-injection=enabled</pre><p>To view istio-injection namespace, we execute the following command.</p><pre>kubectl get ns -L istio-injection</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tvRX6iztE3SGrzzlp9aX3w.png" /><figcaption>Create a new namespace</figcaption></figure><p>In the next step, we will deploy a simple helloapi node.js application into the Kubernetes cluster. The relevant source code is hosted in <a href="https://github.com/phoenixinfotech1984/hello-app">Github</a>.</p><pre>kubectl apply -f deployment.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2_V6NByRmMThgTiMlcmEfw.png" /><figcaption>Deployment of hello API</figcaption></figure><h3>Step 3b — Accessing Node.js app through istio</h3><p>We have to configure the istio ingress gateway and create a virtual service with the host: <strong><em>helloapp.phoenix.com</em></strong>, to access the Node.js application deployed in the previous step.</p><pre>kubectl apply -f gateway.yaml</pre><pre>kubectl apply -f virtualservice.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zVbKBT3VzbdkOJi34gK6WA.png" /><figcaption>Virtual service and Gateway creation</figcaption></figure><p>On successfully applying the <strong><em>gateway</em></strong> and the <strong><em>virtual service</em></strong>, the node.js app can be accessed from the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*T8cLRhULenLr8OeDjQctQw.png" /><figcaption>Connection successfully established with the API</figcaption></figure><p><strong>Note</strong>: Map “helloapp.phoenix.com” host to External IP in your host file. And to get the external IP run the following command.</p><pre>kubectl get svc istio-ingressgateway -n istio-system</pre><p>The service mesh can be visualized in both Kiali and Grafana dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tJisKvQ_IgXvOPgjBOj73A.png" /><figcaption>Kiali Dashboard</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*likjKbsPDXDEpDCFPHa8-Q.png" /><figcaption>Grafana Dashboard</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FTEhoBew9zfvvaYSO2y%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FTEhoBew9zfvvaYSO2y&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FTEhoBew9zfvvaYSO2y%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="251" frameborder="0" scrolling="no"><a href="https://medium.com/media/729bba0395f8fe6ac78c5e8bee67e30f/href">https://medium.com/media/729bba0395f8fe6ac78c5e8bee67e30f/href</a></iframe><h3>Step 4 — Release a new version of Node.js app into Kubernetes Cluster</h3><p>Next we deploy the second version of the helloapi node.js application into the Kubernetes cluster.</p><pre>kubectl apply -f deployment-canary.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1f3FgG16AYAHqUAYq62weA.png" /><figcaption>Version v2 deployment</figcaption></figure><p>We will define a <strong>destination rule</strong> to route the traffic based on various policies. Apply destination rule using the following command.</p><pre>kubectl apply -f destination.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U0um9y4OIi9T-0CN2OwQYQ.png" /><figcaption>Applying Destination Rule</figcaption></figure><h3>Step 4 — Canary Rollout</h3><p>With two versions of the hello app deployed in a Kubernetes cluster (version v1 and v2), we can look at various deployment strategies.</p><h4>Subset/Version (Blue-Green)</h4><p>Following kubectl command needs to be applied to enable Subset/Version deployment</p><pre>kubectl apply -f virtualservice-bluegreen.yaml</pre><p>We can define a <strong><em>subset/version</em></strong> of a <strong><em>route destination</em></strong> in a virtual service which is identified with a <strong><em>reference</em></strong> to a <strong><em>named service subset</em></strong> defined in the <strong><em>Destination Rule</em></strong>.</p><p>For example, if the subset of the route destination is “<strong><em>stable”</em></strong>, it is identified with a reference service subset defined in the <strong><em>destination rule</em></strong> and all HTTP traffic is routed to the pods of helloapi service with label “<strong><em>v1</em></strong>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*CPumMp08xHTrBzDhnfVdVQ.png" /><figcaption>Http traffic routed towards Stable version</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl0Fixb7jiwUj1Mrg4L%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fl0Fixb7jiwUj1Mrg4L&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl0Fixb7jiwUj1Mrg4L%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="251" frameborder="0" scrolling="no"><a href="https://medium.com/media/931dab824fdeba7f23b7b302887ef233/href">https://medium.com/media/931dab824fdeba7f23b7b302887ef233/href</a></iframe><p>In the second example, we changed the subset of the route destination to “<strong><em>canary”</em></strong>, so in this case, all HTTP traffic is routed to the pods of <strong><em>helloapi</em></strong> service with label “<strong><em>v2</em></strong>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*Q5aIu8857bLh5-vH7CJJHw.png" /><figcaption>Http traffic routed towards Canary version</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FJTDAN1uCnUJJTv2yX0%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FJTDAN1uCnUJJTv2yX0&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FJTDAN1uCnUJJTv2yX0%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="251" frameborder="0" scrolling="no"><a href="https://medium.com/media/75a46c2603756b7ac40a2cb28b3482cb/href">https://medium.com/media/75a46c2603756b7ac40a2cb28b3482cb/href</a></iframe><h4>Traffic splitting using Weight (Beta Testing)</h4><p>Following kubectl command needs to be applied to enable weight based traffic splitting</p><pre>kubectl apply -f virtualservice-weight.yaml</pre><p>We can split the HTTP traffic based on weight, a certain percentage of the traffic can be routed to the new release.</p><p>In the below example, based on the <strong><em>weight</em></strong> parameter 90% of the traffic is routed to the <strong><em>stable</em></strong> release and 10% percent of the traffic is routed to the <strong><em>canary</em></strong> release.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*m3DDk2mnBcx1JD-3V2Dddg.png" /><figcaption>Weight-based traffic routing</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FQWSOZV2D6B272ZQ3rd%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FQWSOZV2D6B272ZQ3rd&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FQWSOZV2D6B272ZQ3rd%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="251" frameborder="0" scrolling="no"><a href="https://medium.com/media/2edb479054a204f5c134dddc194b7947/href">https://medium.com/media/2edb479054a204f5c134dddc194b7947/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*akXnyq2CJh8JsCW9MnpnDw.png" /><figcaption>Grafana visualization of weight-based traffic splitting</figcaption></figure><p><strong>Header based traffic splitting (A/B testing)</strong></p><p>Following kubectl command needs to be applied to enable header-based traffic splitting</p><pre>kubectl apply -f virtualservice-header.yaml</pre><p>We can split the HTTP traffic based on the header parameters defined in the request.</p><p>In the following example, a subset of the route destination is decided based on the header parameter “<strong><em>end-user</em></strong>”. If the request has a header “end-user” set to “<strong><em>phoenix-user</em></strong>” the traffic is routed to <strong><em>canary</em></strong> release, if not it is routed to a <strong><em>stable </em></strong>release</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*rKQ6Dio6hy-ZZSu0AYvvPw.png" /><figcaption>Split HTTP traffic based on the request header</figcaption></figure><p><strong>Note</strong>: We have used a chrome extension — <a href="https://chrome.google.com/webstore/detail/modheader/idgpnmonknjnojddfkpgkljpfnnfcklj?hl=en">ModHeader</a> to add headers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*esM0twaWLDEGrY9fwHBlSA.png" /><figcaption>Header end-user set to phoenix-user</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C9JCoGIx6OtmwLRhxrvFiQ.png" /><figcaption>No header set</figcaption></figure><p>Another example to split the traffic based on the header is to detect the browser from which the request is received.</p><p>Following kubectl command needs to be applied to enable header-based traffic splitting</p><pre>kubectl apply -f virtualservice-browser.yaml</pre><p>If the<strong><em> user-agent </em></strong>is a <strong><em>firefox</em></strong> browser, the request is routed to a <strong><em>Stable</em></strong> version. If not the request is routed to <strong><em>Canary</em></strong> release</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*9YyQP7i538Y3rTYip7dV8Q.png" /><figcaption>Browser-based traffic splitting</figcaption></figure><h3>Handling Failures</h3><p>Istio helps to improve the reliability and availability of the services in the mesh. The deployment strategy helps handle service failures and take appropriate fallback actions.</p><p>For instance, when we deployed a new version of the hello app and it errored out for some reason. We can immediately rollback the new deployment by diverting all network traffic to the older version.</p><p>Following kubectl command needs to be applied to enable the previous deployment</p><pre>kubectl apply -f virtualservice-rollback.yaml</pre><p>The above command sets the <strong><em>subset/version</em></strong> of a <strong><em>route destination </em></strong>to <strong><em>Stable </em></strong>assuming the current subset value is set to <strong><em>Canary.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*CPumMp08xHTrBzDhnfVdVQ.png" /><figcaption>Http traffic routed towards Stable version</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FLmxrpFZA8vjCJYQS2S%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FLmxrpFZA8vjCJYQS2S&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FLmxrpFZA8vjCJYQS2S%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="251" frameborder="0" scrolling="no"><a href="https://medium.com/media/7074f8f9b198628b89a1f5bce8eea159/href">https://medium.com/media/7074f8f9b198628b89a1f5bce8eea159/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K75xxauoQkGDbQKU-YBOYg.png" /><figcaption>Grafana visualization of service request</figcaption></figure><p>This will increase the reliability of the service and keep the service available at all times.</p><p>— Thank you for reading —</p><p>Please stay tuned for our next article regarding <strong>Automated Canary Analysis</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf12ef098c52" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multiple ways of deploying a Node.js application into Azure App Service]]></title>
            <link>https://medium.com/@vishal1909/multiple-ways-of-deploying-a-node-js-application-into-azure-app-service-51c0173f6731?source=rss-c34276dc959c------2</link>
            <guid isPermaLink="false">https://medium.com/p/51c0173f6731</guid>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[azure-app-service]]></category>
            <category><![CDATA[azure-portal]]></category>
            <dc:creator><![CDATA[Vishal Patel]]></dc:creator>
            <pubDate>Wed, 25 Dec 2019 15:05:38 GMT</pubDate>
            <atom:updated>2019-12-25T15:05:38.981Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post, we would like to talk about various Deployment techniques that can be used to deploy a simple Node.js application into the <strong><em>Azure App Service</em></strong>.</p><p>Before we get into the technicalities of Azure App Service, we would like to touch upon the basics of <strong><em>Microsoft Azure</em></strong> and <strong><em>CI/CD</em></strong>.</p><p><strong><em>Microsoft Azure</em></strong> is a <strong><em>Cloud Computing Service</em></strong> that provides various tools and services that the development team can use, in order to fasten their build and deploy processes. These tools are cost-effective and less cumbersome.</p><p><strong><em>CI/CD</em></strong> allows us to create and manage build processes that are automatically compiled and tested in the Cloud. This helps end-users to build software on multiple platforms without worrying much about installing software, taking care of various integration points, code repository, work management and build.</p><p>The definition of <strong><em>Azure App Service</em></strong> as per the official document is as follows:</p><blockquote><em>Azure App Service</em> is an HTTP-based service for hosting web applications, REST APIs, and mobile back ends.</blockquote><p>In this post, we will be showing steps to deploy a simple Node.js app in a Linux based App Service using various deployment techniques. We will talk about git deployments through Azure DevOps CI/CD and Kudu Engine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2VfJFoYekJbnR4mF1aV9MA.png" /><figcaption>Azure DevOps App Service Architecture</figcaption></figure><p>We start by creating a Microsoft Azure free tier account and Navigate to <a href="https://portal.azure.com/"><strong>Azure Portal</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7WNBIUTQ0366g200SpLCBA.png" /><figcaption>Link to Navigate to Azure Portal</figcaption></figure><p>The initial view of the portal is shown below, where we would create a Resource group for the Web App.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CVEpHAFhtRKXAl8W90f3zA.png" /><figcaption>Home Screen of the Azure Portal</figcaption></figure><p>A <strong><em>resource group</em></strong> is created in order to bind all the resources assigned to a project. The resources can be monitored from the Azure Dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nkfmip-F5zuLdNtycK2B5g.png" /><figcaption>Various fields to be selected for Resource Group</figcaption></figure><p>While creating the resource group, we choose the type of <strong><em>Subscription</em></strong> and give a unique name to it. We also need to specify the <strong><em>region</em></strong> closest to us or our clients. After choosing all the fields, please review and create the Resource group.</p><p>The next step is to <strong><em>create</em></strong> an <strong><em>App service</em></strong>. The option to create the App Service is available in the Azure portal home page.</p><p>Click on the add button or create <strong><em>App service</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aZymtPKD-APwjmFwQ9289g.png" /><figcaption>App Services Creation</figcaption></figure><p>After clicking, we need to fill in various information such as the current subscription, resource group, Instance Details, and App service plan, as shown below.</p><p><strong><em>Note: Instance Name should be globally unique.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BpEbPx8wfQKOxiAAI1SoZg.png" /></figure><p>We can <strong><em>enable monitoring</em></strong> in order to have full observability into the Application, infrastructure and the network. <strong><em>Add tags</em></strong> to categorize resources and finally Review all the parameters selected and create an App Service project. On successful deployment, an App Service resource gets created in the resource group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vuY967M1CoMtzr_LcKyesQ.png" /><figcaption>Success confirmation of App Service Deployment</figcaption></figure><p>From the Azure portal, choose the newly created App Service to access the dashboard. The dashboard shows numerous information related to the service including the Service state, Development tools, Deployment, and Monitoring. We will be focusing more on the Continuous Deployment aspect of the App Service.</p><p>In order to create an Azure DevOps CI/CD pipeline for an App Service, navigate to the <strong>Deployment Center </strong>from the <strong>Azure dashboard</strong>. Continuous deployment can be configured using various source controls such as Azure Repo, Github, bitbucket and Local Git.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S49OqrUtMXExmAwcgYI5PQ.png" /><figcaption>Deployment Section of Azure Portal</figcaption></figure><p>We will be explaining in detail on how to configure build and deploy pipeline using <strong><em>Azure Repos </em></strong>and<strong><em> Github</em></strong>. Azure Repo explicitly uses <strong><em>Azure Pipeline</em></strong> to build and deploy, whereas Github can be deployed using <strong><em>Azure Pipeline</em></strong> as well as <strong><em>Kudu Engine</em></strong>.</p><h3><strong>Configure build and deploy pipeline from Azure Repos using Azure pipeline</strong></h3><p>As a first step create a new Azure DevOps project by accessing the <a href="https://dev.azure.com/"><strong>Azure DevOps portal</strong>.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U_wMTHOEByc9qszkGBJ-Mg.png" /><figcaption>Project created in the Dev Azure Portal</figcaption></figure><p>With reference to the project created in the previous step, we create a repository (Azure Repos) and push the Node.js source code in it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*sV-_YdqVLkF-Bqk7L1z3TQ.png" /><figcaption>Create New Azure Repo</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5r34WfrRLxpuYxTDNY6bgw.png" /><figcaption>Node.js source code in Azure Repos Source Control</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nra2SrB3yjJ_bGGVLlgogQ.png" /><figcaption>Sample Code</figcaption></figure><p>Now coming back to the <strong><em>Development Center</em></strong> of the <strong><em>App Service (name: helloworld993) in the Azure portal.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*dK3hXAWs9Dm785aILe4NnQ.png" /><figcaption>Created <strong>helloworld993</strong> App Service</figcaption></figure><p>Select <strong><em>Azure Repos</em> </strong>as the source control and continue to choose the Build Provider as <strong><em>Azure Pipelines.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rk5Rd5n_7n9j7IdDIKqaRQ.png" /><figcaption>Deployment Center Options</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hRNm7L1J-maMW1xyMjMqdg.png" /></figure><p>Next, we have to choose all the configurations related to the source code and the build</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aQoPgpeSIffvA3yB-wRXig.png" /></figure><p>Finally, we have to review the deployment summary and click on Finish.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Me7brLSa6b2eheXLI78i2g.png" /><figcaption>Summary of the Azure pipeline</figcaption></figure><p>Azure DevOps CI/CD pipeline is automatically created based on the parameters configured and the build process is initiated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HvfX7FiLNswtbzTbXOzUDg.png" /><figcaption>Azure Repos CI/CD pipeline</figcaption></figure><p>After successful deployment, we can access the application through the URL generated in the Azure app service:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*wkYYAGGzVl1x_zco6Kc0LA.png" /><figcaption>Node.js app deployed in the App Service</figcaption></figure><p>The Azure DevOps CI/CD pipeline that gets automatically created can be viewed and edited in <a href="https://dev.azure.com/">Dev Azure Portal</a>. Azure Continuous integration pipeline for Node.js app looks as shown below and it can be edited.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nmXvl2DoCysNf6OfSTpmSA.png" /><figcaption>CI Auto-Generated build pipeline for Node.js App</figcaption></figure><p>Azure release pipeline looks like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J8_ZqPDHKdHdrJLFu6Kv1A.png" /><figcaption>CD Auto-Generated release pipeline for Node.js App</figcaption></figure><p>Similarly, we can configure the build and deploy pipeline for other source controls such as Github and Local Git using the Azure pipeline.</p><h3><strong>Configure build and deploy pipeline from Github using Kudu</strong></h3><p>First, we have to Authorize our Github repository with Microsoft Azure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b_Fxe_vSblyKWrcD37hlwA.png" /><figcaption>Github Repository for Node.js App</figcaption></figure><p>Once the Github account is successfully authorized, navigate to the <strong><em>Development Center</em></strong> of the <strong><em>Azure portal</em> </strong>and click on <strong><em>Github</em> </strong>as the source control and continue to choose the Build Provider as <strong><em>Kudu app service. </em></strong>App service Kudu engine builds the code during deployment (when applicable) without any additional configuration required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ld7lXSIUQ_kczjcQSnS3YQ.png" /><figcaption>Choose Kudo Build Provider</figcaption></figure><p>Next, we have to choose configurations related to the source code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kPTQUJmy-8sWIgxQT4LCpQ.png" /><figcaption>Configure Github Repository</figcaption></figure><p>Finally, we have to review the deployment summary and click on Finish.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*93qPqdI-3ejkC4A5UZSjpA.png" /><figcaption>Deployment Summary Kudo App Summary</figcaption></figure><p>App service Kudu engine automatically builds the Node.js app and does the deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-H1UUocNjzNR-vUnQ3lX0Q.png" /><figcaption>Kudo Engine Github Deployment</figcaption></figure><p>After successful deployment we can access the application through the URL generated in the Azure app service:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*wEeZZXpoqS3o2tcGeibe9A.png" /><figcaption>Node.js app deployed in the App Service from Github</figcaption></figure><p>In a similar way, the App service kudu engine can also build and deploy Node.js apps from the <strong><em>Local Git repository.</em></strong></p><p>— Thank you for reading —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51c0173f6731" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>