<?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 Didem Bayar on Medium]]></title>
        <description><![CDATA[Stories by Didem Bayar on Medium]]></description>
        <link>https://medium.com/@didembayar?source=rss-67b55691c359------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*zkMe5A8We5e0XJR_BMZV1Q@2x.jpeg</url>
            <title>Stories by Didem Bayar on Medium</title>
            <link>https://medium.com/@didembayar?source=rss-67b55691c359------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 14:51:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@didembayar/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[Kubernetes Deployment Strategies]]></title>
            <link>https://didembayar.medium.com/kubernetes-deployment-strategies-476571c0be11?source=rss-67b55691c359------2</link>
            <guid isPermaLink="false">https://medium.com/p/476571c0be11</guid>
            <dc:creator><![CDATA[Didem Bayar]]></dc:creator>
            <pubDate>Mon, 20 Dec 2021 12:18:07 GMT</pubDate>
            <atom:updated>2021-12-20T12:18:07.480Z</atom:updated>
            <content:encoded><![CDATA[<p>As we know that, deploying microservices on kubernetes is becoming important day by day because of benefits of it. Deploying microservices causes of confusion sometimes due to its smallest unit approach. We can manage our Kubernetes deployment with pipeline configs and we can automate it. There are several different types of Deployment but we focus on kubernetes deployment strategies as listed below.</p><ol><li><strong><em>Rolling Strategy Deployment</em></strong></li><li><strong><em>Recreate Deployment</em></strong></li><li><strong><em>Blue-Green Deployment</em></strong></li><li><strong><em>Canary Deployment</em></strong></li></ol><h3><strong><em>Rolling Strategy Deployment</em></strong></h3><p>This deployment strategy is default in Kubernetes. In this approach, deployment operations can be performed without downtime. It works step by step slowly. There is no downtime as previous version of pods are not aborted before all steps are completed. Firstly, a new version of all necessary pods are created and then switch operation from the previous to new version is done.</p><p>Also, <em>readiness probe</em> that what do to if pods is not ready or there is a failure statement has important role in this deployment. According to readiness probe, previous version of pods will be aborted or rolling update will be started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*fkXFm1PKqyi8ubZzmSdGwQ.png" /><figcaption>Rolling Strategy Deployment</figcaption></figure><p>On deployment config, there are two major parameters;</p><p><strong>MaxSurge</strong>: Maximum number of pods the deployment is allowed to create at a time.</p><p><strong>MaxUnavailable: </strong>Maximum number of pods that are allowed to be unavailable during rollout.</p><p>Both of them can be numbers or percentages, and the default is 25% each.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4714d2e3f656b8ddb144444982c0961b/href">https://medium.com/media/4714d2e3f656b8ddb144444982c0961b/href</a></iframe><h3>Recreate Deployment</h3><p>In this approach causes downtime since there is no switch operation. First, old version of all pods are scaled down, then new version of pods are scaled up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*uOg58wGe2RKEsKMr2YVMXw.png" /><figcaption>Recreate Deployment</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a5615c3d75c46bec0543e19f1f75fdca/href">https://medium.com/media/a5615c3d75c46bec0543e19f1f75fdca/href</a></iframe><p>Readiness probe is also important part of this deployment. Consider that, replica set count is greater than one, if first replica set fails according to readiness probe, deployment goes down.</p><h3>Blue-Green Deployment</h3><p>It is also called by Red-Black deployment. There is no downtime like rolling strategy but blue-green is more complicated. There is no versioning since blue and green satisfy it.</p><p>Let <em>Blue</em> be the current version and <em>Green</em> the new version. When green pods are created, the traffic flows on blue is not affected by green deployment. Then, green deployment stages are done, the traffic is switched green traffic flow is provided. Even if the switch operation is done, the old version blue is kept just in case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*ZG2Q8NEzD7NG2GrUkQKFNQ.png" /><figcaption>Blue-Green Deployment</figcaption></figure><p>The most important benefit of this deployment type is rolling operation is easy. If unexpected things happen, it is very easy to switching back to the previous version immediately.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3b460b29174dcd53cab730b7c35fe15c/href">https://medium.com/media/3b460b29174dcd53cab730b7c35fe15c/href</a></iframe><h3>Canary Deployment</h3><p>It is similar to Green-Blue Deployment but more controllable and provides partial deployments. It allows us to test the some feature with real users but not all users. As the general approach like A/B testing, there will be identical two or more servers and traffic flow to these servers is determined by certain rules. Canary deployment provides this with using Kubernetes.</p><p>Let <em>X</em> be a new feature to be tested. If X is deployed by using Canary deployment strategy on Kubernetes, you can manage traffic flow according to certain rules. Some active ports do not have the X feature and some do, also you can set the percentage of ports. As time goes by, new feature is tested and reported by analyzing metrics, performance comparisons etc. According to the reports, the partitioning percentage can be increased and this feature can be added to all of them slowly or the new feature can be abandoned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*aszTaWPHqv_Mbs5QV9jmgQ.png" /><figcaption>Canary Deployment</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/29a2dfa80d1b00be15ef40ba0a6ce4bb/href">https://medium.com/media/29a2dfa80d1b00be15ef40ba0a6ce4bb/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0420c4a74619e123f42bbc8d25717ea9/href">https://medium.com/media/0420c4a74619e123f42bbc8d25717ea9/href</a></iframe><p>According to example of deployment.yaml files above, version 2 ensures only 25% of our workload will be on the updated pod.</p><p><strong><em>To summarize, each approach has its own specific benefits. </em>You should make the relevant choice, taking into account the needs of your own service and the degree of importance of these requirements. According to scalability, velocity, testing, etc. t<em>he key here is to find the most compatible one for your service.</em></strong></p><p>I hope it was useful for everyone. Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=476571c0be11" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>