<?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 Eytan Avisror on Medium]]></title>
        <description><![CDATA[Stories by Eytan Avisror on Medium]]></description>
        <link>https://medium.com/@eytan_avisror?source=rss-262fc802534------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*gmZRPaLmR8-_U_StgeP8tw.jpeg</url>
            <title>Stories by Eytan Avisror on Medium</title>
            <link>https://medium.com/@eytan_avisror?source=rss-262fc802534------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 01:01:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@eytan_avisror/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[How I became a homestead software engineer]]></title>
            <link>https://medium.com/@eytan_avisror/how-i-became-a-homestead-software-engineer-853a506a9abd?source=rss-262fc802534------2</link>
            <guid isPermaLink="false">https://medium.com/p/853a506a9abd</guid>
            <category><![CDATA[remote-working]]></category>
            <category><![CDATA[farming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[homesteading]]></category>
            <category><![CDATA[relocation]]></category>
            <dc:creator><![CDATA[Eytan Avisror]]></dc:creator>
            <pubDate>Tue, 18 Oct 2022 16:01:01 GMT</pubDate>
            <atom:updated>2022-10-18T16:01:01.527Z</atom:updated>
            <content:encoded><![CDATA[<p>I am a software engineer with 10 YOE who decided to go back to simple living and escape the matrix.</p><p>A year ago my wife and I closed on a 5-acre property in East Tennessee with the intent to start a <strong>homestead</strong> or a “hobby farm”, while still working as a fully remote software engineer. Since then, I’ve had many colleagues and friends express interest in our decision, so I’ve decided to share some of my learnings and experience, on both farming and the relocation process, and how it all works while working in tech — with the hope I can inspire others to live a healthier, more simple life — it’s definitely been an amazing journey for us — but also to show that <strong>homesteading is really not as difficult and scary as it may seem</strong>.</p><p>In this first part, I will tell you about how we planned and executed our move from suburban life in silicon valley to living on a farm in East Tennessee.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MNEocJpiIN5eLSEFx88m4g.jpeg" /><figcaption>The “Before” picture — my daily view 🏢</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c0yEKXq7bdwO4w00hN4ewg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pO4Cli5QePJBS1el5G1pyg.jpeg" /><figcaption>After — our layer flock this spring on pasture 🐔🌿</figcaption></figure><h3>How it started</h3><p>Back in early 2021, almost a year into the pandemic, two major things happened to us:</p><ul><li>Our son was born</li><li>We discovered we really enjoy gardening</li><li>We realized that remote work presented an amazing opportunity</li></ul><p>Growing food is extremely rewarding, you get to experience nurturing something from seed to food, and learn a lot about how nature (actually) works along the way — Our small San Jose container garden started out pretty miserable, but very quickly became a highly producing garden.<br>We started thinking —<strong> how can we spend more time gardening and being outdoors?</strong></p><p>We also considered, just recently having our firstborn son Dean, <strong>how can we provide him with an awesome childhood?</strong></p><p>Other considerations at the time were the impending collapse of society, food shortages, and a possible zombie apocalypse — <strong>how can we have a more abundant, self-reliant lifestyle?</strong></p><p>And finally, as we both work for tech companies, considered <strong>how can we live a healthier life, and become more resilient to burnout</strong>, which was a bi-yearly occurrence for me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*v2Q70VJ4SPBUKajDyV4_9Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qab76q4BkAAf_gb4Erdceg.png" /><figcaption>The perfect cure to burnout 👍</figcaption></figure><h3><strong>How is it going to work?</strong></h3><p>We kept asking ourselves, how are we going to do this while still working remotely; timezones are a beautiful thing — If you work for a team in PST, and move to EST you gain 3 full hours to do your chores in the morning, and use your weekends for larger projects. And as a software engineer I am pretty big on “getting things done” at work and using my time efficiently. My wife quit her job and started her own sole-proprietorship as a graphic designer so she could spend more time with our son and have a more flexible schedule — she wakes up at around 7AM with our son and I go out to do the morning chores at around 8AM and we meet an hour later for breakfast, I then start my job related work at around 10–11AM (7-8AM PST) and usually work till about 6PM.</p><h3>Start small</h3><p>At first when the radical idea of switching to fully remote and moving across the country to start farming was suggested, it was so exciting we immediately started looking at 100-acre properties across the country, but quickly came to the conclusion that we need to focus and create an actual plan — this included:</p><ul><li><strong>Which state offers what we are looking for?</strong> think taxes, housing, land price, weather, cultural fit, and proximity to a town/city</li><li><strong>How many acres do we actually need?</strong> 5? 50? 500?</li><li><strong>What kind of features should the property have to support our goals?</strong> a forest? a pond? a pasture?</li></ul><p>There is no good number for number of acres, in my mind, the more you can get, the better, but we finally settled on 5–10 range as a good <strong>starter homestead</strong>. This was particularly clear after we visited a few 5 acre properties, and realized how huge 5 acres actually is. Some YouTubers we were following have created amazing food forests that can feed 20+ households on 1/4 acre backyards.</p><p>How much is an Acre you ask? 1 Acre is about 9.3 Basketball courts if it helps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*hpw-VxaIIaRs1E_s77wueQ.png" /><figcaption>This picture shows about 3 acres all the way to the tree line</figcaption></figure><p>We also knew we wanted mostly flat piece of land so we can make good use of it, have plenty of access to water, and be somewhat of a distance from the main road with a decent house on it, as well as mild weather to some extent —<strong> there is no improvement to be gained in terms of weather when leaving North California’s Bay.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*YyzG4PA7BC-nE93qUE97xw.jpeg" /><figcaption>November frost</figcaption></figure><p>We started looking into various states and their cost of living, housing prices, tax laws, homeschooling laws, timezones, etc. and ended up with a list of about 8 states which were an option and finally narrowed it down to the final 3 — Texas, Tennessee, and Idaho.</p><p>All 3 states offered a relatively cheap housing market and cost of living, some had added perks of no state income tax (Texas, Tennessee) and low property taxes (Tennessee), as well as available properties in nice areas which are not too far out in the sticks, with access to some basic town amenities, coffee shops, Lowes, etc. in moderate driving distance.</p><p>We ended up choosing Tennessee because it had the perfect combination of being on EST, low cost of living, low taxes, lax laws, and relatively mild climate with plenty of rain and generally great soils.</p><h3>Closing remotely</h3><p>One suggestion I can share on the topic of making offers is — don’t attempt to do it without seeing the property first, thinking you would fly in if the offer is accepted. This can be extremely stressful, and when you actually go see it, it’s not what you thought. Our first trip to East Texas was just that — our offer was accepted for a 5-Acre property on the lake in Tyler and we flew in over the weekend to have it inspected — it looked amazing on the listing, but turned out to be a pretty bad fit for us when we got there. Texas’ August heat almost killed us, insane amount of bugs, tics, wasps, and other flying insects everywhere, the house was in bad shape, the land was heavily forested, and soil was pretty sandy. We ended up backing out of the deal and flew back home pretty disappointed and discouraged. It took a lot to be able to say “This is not the right place for us, let’s back out” — we wanted to like it, but we are very happy we listened to our instincts, because we really love our little farm in East Tennessee.</p><p>We ended up taking a trip to Tennessee (without any accepted offers), after we lined up a few realtors to show us some homes, and spent a few days in the Nashville area, and a few days in the Knoxville area, we saw about 5–6 houses and made a couple of offers, one of which was accepted and we were able to close on our place remotely from San Jose <strong>AFTER</strong> seeing the place.</p><p>The move itself was not easy! moving companies gave us estimates at around 25K to move our 3BR house from San Jose to TN, so we ended up renting a small U-Haul for an insane price (I guess everyone was leaving CA at the time and trucks were hard to come by), pay a friend to drive it for us, and drive our car with our son and dog in the back — this brought the moving price to about 13K — 4K for the truck, 4K for the driver, 2K packing, loading and unloading the truck, and the rest for gas, hotels and food. We had to take the drive pretty slow because our son was 6 months old at the time, and could not be subjected to more than 3–4 hrs in a vehicle, so it took us<strong> 8 days</strong> to arrive, driving about 4hrs a day and about 2,500 miles!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fj7uiFLnBvAodk2m00KFsQ.png" /><figcaption>The day of the big move</figcaption></figure><h3>LCOL</h3><p>We were actually able to cut our routine expenses in half by making the move to a lower cost of living area, but no one prepared us to how costly it can be to become a homeowner, especially on a large property! Endless renovations, projects, fixing things, and buying tools means you will spend most if not all of your available income in the first year, depending on the condition of the house, and available farming infrastructure. Hell, I probably spend around $600 a month during the summer months on mowing the full 5-acres and keeping the brush at bay — there are less costly ways to manage this (like cattle, or your own zero turn mower), but it takes time to build up to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A51LYj6Ugh6jzmOZ0maQqw.jpeg" /><figcaption>Me and my favorite chicken — Kunefa</figcaption></figure><p>In the next parts of this series I will tell you more about our projects over the last year, and how we got from a vacant 5 acres to having 20 egg layers, a 60-ft long greenhouse, 2 mice-hunter cats, many fruit trees, and a freezer full of our own pastured poultry, so make sure you stay tuned!</p><p>You can check out our <a href="https://www.instagram.com/littlecreekfarm.tn">instagram page</a> for more content.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=853a506a9abd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rapid Auto-Scaling on EKS — Part 2]]></title>
            <link>https://medium.com/keikoproj/rapid-auto-scaling-on-eks-part-2-d094b9b2cd62?source=rss-262fc802534------2</link>
            <guid isPermaLink="false">https://medium.com/p/d094b9b2cd62</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[autoscaling]]></category>
            <dc:creator><![CDATA[Eytan Avisror]]></dc:creator>
            <pubDate>Fri, 07 May 2021 18:32:41 GMT</pubDate>
            <atom:updated>2021-05-07T18:32:41.934Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2aIblBVKDGqsSizVHYOz9g.jpeg" /></figure><h3>Rapid Auto-Scaling on EKS — Part 2</h3><p>In <a href="https://medium.com/keikoproj/rapid-auto-scaling-on-eks-part-1-bb4de84fc599">Part 1</a> of this series, we examined how you can achieve <strong>Functional Node Readiness</strong> within 30 seconds on EKS. In this article, we will examine how we can improve the <strong>Bootstrapping</strong> and <strong>Provisioning</strong> time on EKS using Warm Pools.</p><h3><strong>Warm Pools for Auto Scaling</strong></h3><p>In April of 2021, AWS has launched a feature called “<a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html">Warm Pools for Auto-Scaling Groups</a>”, this allows you to keep stopped or running instances available as part of your scaling group, while maintaining a separate capacity pool. The more interesting use-case for EKS Clusters being <strong>Stopped</strong> instances, which outside of the EBS volume cost, are free. It allows you to replace the <strong>Provisioning</strong> time by the time it takes your OS to boot up, since the instance is already provisioned, just stopped, and this can be additional time we can save from the scaling process.</p><p>Unfortunately, when we looked into integrating this to <a href="https://github.com/keikoproj/instance-manager">instance-manager</a> which is our <strong>operator for provisioning scaling groups </strong>— we noticed the docs mention “Warm pools currently can’t be used with ECS, EKS, and self-managed Kubernetes”.</p><p>But we wanted to know why, exactly why.</p><h3>“RTFM” — No.</h3><p>Nothing wrong with disregarding documentation and trying something for yourself, don’t get me wrong, we also reached out to AWS to ask “<strong>Why exactly</strong>”, but while waiting for their answer we just tried using it, and we quickly found the answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*3w-SgbdFOMXs0GGXs7RbXw.png" /><figcaption>A pool of pre-warmed instances</figcaption></figure><p>In order to reach the lifecycle state “Warmed:Stopped”, you first have to go through a few other states, but essentially the EC2 instance is started as it normally is, runs it’s user-data script, and once user-data has finished it’s execution, the instance is stopped. The problem is that between user-data’s completion and shutting down the instance, there is a time window where the node actually might join the cluster, and due to our previous improvements can quickly become ready and actually start scheduling workloads, only to be shut down few moments later.</p><p>We noticed this might leave a <strong>NotReady</strong> node in the cluster, or that eventually Kubernetes removes the nodes — but it still seemed like a bad thing to put in production, we had to find a way to <strong>skip</strong> <strong>bootstrapping</strong> the node if it was simply warming up, and only allow bootstrapping when the instance transitions into the capacity pool due to actual scaling.</p><p>While we figured out what the problem is, AWS changed their docs to reflect the same reasoning, at the time of writing this, it reads “If you try using warm pools with Amazon Elastic Container Service (Amazon ECS) or Elastic Kubernetes Service (Amazon EKS) managed node groups, there is a chance that these services will schedule jobs on an instance before it reaches the warm pool.”</p><h3>The Workaround</h3><p>So until AWS rolls out some sort of native support, we wanted to find a workaround for this issue, so that we can enjoy the benefits of warm pools and possibly remove extra precious seconds from our scale time.</p><p>We needed to basically skip the bootstrapping entirely, in case the instance was getting warmed up, and then make sure that the next boot-up, when actual scaling occurs, user-data runs <strong>again, </strong>this time, bootstrapping the node to the cluster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*eK3eu8olbKaFx0SwG35S_g.png" /></figure><p>So, with a bit of tinkering, we were able to modify our user-data script to do exactly that, in the case of <strong>Amazon Linux 2 </strong>it looked like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/670c411deb05884cb19b2bd66f1aae71/href">https://medium.com/media/670c411deb05884cb19b2bd66f1aae71/href</a></iframe><p>And in the case of <strong>Windows</strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b3172b6298c1125e2603935559c80dd6/href">https://medium.com/media/b3172b6298c1125e2603935559c80dd6/href</a></iframe><p>This worked perfectly! The downside was that we introduced additional dependencies on the AMI for users who want to use warm pools with <a href="https://github.com/keikoproj/instance-manager">instance-manager</a> — in the case of Amazon Linux 2, the AMI needs to have both jq and awscli and in addition to that the IAM role associated with the instance, must have access to DescribeAutoscalingInstances so that it can check it’s own lifecycle state and see whether it contains the “<strong>Warmed</strong>” prefix. The same is relevant for Windows only instead of those packages we require the Get-ASAutoScalingInstance cmdlet installed.</p><p>The API for using warm pools with <a href="https://github.com/keikoproj/instance-manager">instance-manager</a> is also very simple, just add WarmPoolSpec your InstanceGroup EKSSpec and define the min/max ranges, you can use -1 to reflect the scaling group’s max, however it probably doesn&#39;t make sense to run more than a few warm instances for even large scaling groups.</p><pre>apiVersion: instancemgr.keikoproj.io/v1alpha1<br>kind: InstanceGroup<br>metadata:<br>  name: hello-world<br>  namespace: instance-manager<br>spec:<br>  provisioner: eks<br>  eks:<br>    maxSize: 6<br>    minSize: 3<br>    <strong>warmPool:<br>      maxSize: -1<br>      minSize: 0<br>    </strong>configuration:<br>      &lt; .. additional configuration .. &gt;</pre><h3>The Results</h3><p>After running a few very basic tests, we finally got the results.</p><p>On <strong>Amazon Linux 2</strong>, Provisioning time went from around ~2 minutes, to ~1 minute.<br>On <strong>Windows, </strong>Provisioning time went from ~7 minutes to ~3 minutes.</p><p>Around a 50% improvement — not bad!</p><p>So given all of these changes we made, with warm pools, and cluster configuration changes, where did we start and where did we end up?</p><p>Total time from a <strong>pending pod</strong> to <strong>running pod</strong> (with auto-scaling).<br>Before: <strong>~4 to 5.5 minutes </strong>(depends on race conditions discussed in part 1)<strong><br></strong>After: <strong>90 seconds average</strong></p><p>If you want to use warm pools with EKS, now you can - if you integrate <a href="https://github.com/keikoproj/instance-manager">instance-manager</a>. It answers our use cases for platform management and is deployed on each of our 182 EKS clusters, <a href="https://medium.com/keikoproj/instance-manager-a-kubernetes-native-worker-node-manager-345a18ff0428">here</a> is a previous article we published recently about the specifics of instance-manager and the use-cases it answers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d094b9b2cd62" width="1" height="1" alt=""><hr><p><a href="https://medium.com/keikoproj/rapid-auto-scaling-on-eks-part-2-d094b9b2cd62">Rapid Auto-Scaling on EKS — Part 2</a> was originally published in <a href="https://medium.com/keikoproj">keikoproj</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rapid Auto-Scaling on EKS — Part 1]]></title>
            <link>https://medium.com/keikoproj/rapid-auto-scaling-on-eks-part-1-bb4de84fc599?source=rss-262fc802534------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb4de84fc599</guid>
            <category><![CDATA[autoscaling]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Eytan Avisror]]></dc:creator>
            <pubDate>Tue, 04 May 2021 19:18:12 GMT</pubDate>
            <atom:updated>2021-05-08T03:33:49.043Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*egu-g7OBZ-RZHMMqtDIBmw.jpeg" /></figure><p>The ability to autoscale quickly is a crucial ability for any application to have, but it’s also a critical requirement for any platform team that needs to rotate nodes on large clusters.</p><p>We’ve been building the Kubernetes Platform @ Intuit for the last few years, more recently on top of <strong>Amazon’s EKS</strong>, and started noticing how painfully long it takes to rotate 500-node clusters, especially when you have hundreds of clusters— we needed to figure out why things were taking so long, and come up with a way to speed it up, and our platform tenants were getting frustrated from the long upgrade windows.</p><h3>Node Startup</h3><p>An EC2 instance goes through several stages on its way to become a functional node in the cluster. First, the instance is <strong>Provisioned</strong> and needs to boot up, then it gets <strong>Bootstrapped</strong> by running a user-data script, next it joins the Kubernetes cluster as a node and becomes <strong>Ready</strong>, and finally, pods are scheduled on the new node.</p><p>We examined how long each stage took for Amazon Linux 2, with a basic user-data script, and our current cluster configuration for EKS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*skL_dQf2R6-wyHcA0tWclA.png" /></figure><p>Next, we wanted to evaluate why these stages take this long and try to come up with ways we can speed it up.</p><h3>Fast &amp; Functional Readiness</h3><p>First, we wanted to understand why our nodes were taking anywhere between 3 to 4 minutes to enter a <strong>Ready</strong> state, if this is the case in your cluster, keep reading — you are about to improve it dramatically.</p><p>While wanting to improve the time for a node to become <strong>Ready</strong>, it’s also important to state that we wanted <strong>Functional Readiness</strong>, meaning, we wanted a node to actually be fully ready, with certain daemonsets fully up, such as node-local-dns, kiam-agent, etc.</p><h3>Always Blame the DNS</h3><p>Our first finding was quite shocking, <strong>kube-proxy </strong>was spending approximately 40s doing absolutely nothing but trying to resolve a bad node name of itself before loading up and creating iptable rules for service endpoints, which in turn caused a delay for other daemonsets such as node-local-dns, kiam-agent and even <strong>aws-node</strong> (EKS CNI) which acts as the final gate for a node’s readiness.</p><pre>E0420 06:48:19.413329       1 node.go:125] Failed to retrieve node info: nodes &quot;ip-10-105-232-116.vpc.internal&quot; not found<br>E0420 06:48:20.584384       1 node.go:125] Failed to retrieve node info: nodes &quot;ip-10-105-232-116.vpc.internal&quot; not found<br>E0420 06:48:22.884535       1 node.go:125] Failed to retrieve node info: nodes &quot;ip-10-105-232-116.vpc.internal&quot; not found<br>E0420 06:48:27.161128       1 node.go:125] Failed to retrieve node info: nodes &quot;ip-10-105-232-116.vpc.internal&quot; not found<br>E0420 06:48:36.482608       1 node.go:125] Failed to retrieve node info: nodes &quot;ip-10-105-232-116.vpc.internal&quot; not found<br>E0420 06:48:55.017438       1 node.go:125] Failed to retrieve node info: nodes &quot;ip-10-105-232-116.vpc.internal&quot; not found<br>I0420 06:48:55.017464       1 server_others.go:178] can&#39;t determine this node&#39;s IP, assuming 127.0.0.1; if this is incorrect, please set the --bind-address flag</pre><p>Rather strangely, kube-proxy was trying to retrieve its own node information by using the hostname of the EC2 instance, ip-10-105-232-116.<strong>vpc.internal</strong>; however, the node name is actually ip-10–105–232–116.<strong>us-west-2.compute.internal </strong>, this was happening because in our DHCP options the domain name is set to .vpc.internal, and it meant that by giving kube-proxy the node name to use instead, we would avoid this delay entirely, and any potential delay that followed due to dependent pods restarting.</p><p>We were able to work around this by adding the following snippet to kube-proxy’s daemonset to override the hostname with the node name via the downward API.</p><pre>- command:<br>  - kube-proxy<br>  <strong>- --hostname-override=$(NODE_NAME)</strong><br>  - --v=2<br>  - --config=/var/lib/kube-proxy-config/config<br>  <strong>env:<br>  - name: NODE_NAME<br>    valueFrom:<br>      fieldRef:<br>        apiVersion: v1<br>        fieldPath: spec.nodeName</strong></pre><p>This tiny change took our readiness time down to~<strong>2m</strong>!</p><p><strong>Before</strong></p><pre>NAME                    READY   STATUS              RESTARTS   AGE<br>test-6fd7585cbf-4rmzs   0/1     ContainerCreating   0          3m32s</pre><p><strong>After</strong></p><pre>NAME                    READY   STATUS              RESTARTS   AGE<br>test-6fd7585cbf-kj5dp   0/1     ContainerCreating   0          110s</pre><h3>The Race Condition</h3><p>The next thing we noticed when we looked at readiness time, is that some daemonset pods randomly restart right after they get scheduled, it looked somewhat like this:</p><pre>NAME                 READY   STATUS        RESTARTS   AGE<br>aws-node-j6jqm       1/1     Running       1          6h6m<br>aws-node-ktmvp       1/1     Running       0          5h36m<br>aws-node-kxpph       1/1     Running       0          5h57m<br>aws-node-ml7hz       1/1     Running       0          26m<br>aws-node-mlrcx       1/1     Running       1          26m<br>aws-node-sdzb2       1/1     Running       0          6h7m<br>aws-node-skcjn       1/1     Running       0          9s<br>aws-node-sz76g       1/1     Running       0          6h16m<br>aws-node-tm8gn       1/1     Running       1          11d<br>aws-node-wqs8l       1/1     Running       1          11d<br>aws-node-wxgbc       1/1     Running       1          6h16m</pre><p>If <strong>aws-node</strong> was getting restarted occasionally when it joins, and it’s responsible for marking a node <strong>Ready</strong>, this was certainly causing some delays.</p><p>It turns out this was happening because of a scheduling and start-up race condition — when nodes join the cluster, they immediately get scheduled with daemonset pods, if these pods have any dependencies on each other, such as<strong> kube-proxy</strong> and<strong> aws-node</strong>, and they start up at the wrong time, one will restart causing precious seconds of delay.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*WbZgRzbqvjuPaIDXcRpjuQ.png" /></figure><p>In the case of <strong>aws-node</strong>, it clearly shows it could not reach the Kubernetes service endpoint by the time it started:</p><pre>ERROR: logging before flag.Parse: E0428 04:35:27.000103      10 memcache.go:138] couldn&#39;t get current server API group list; will keep using cached value. (Get https://172.20.0.1:443/api?timeout=32s: dial tcp 172.20.0.1:443: i/o timeout)<br>time=&quot;2021-04-28T04:35:27Z&quot; level=error msg=&quot;failed to initialize service object for operator metrics: OPERATOR_NAME must be set&quot;<br>time=&quot;2021-04-28T04:35:27Z&quot; level=error msg=&quot;failed to get resource client for (apiVersion:crd.k8s.amazonaws.com/v1alpha1, kind:ENIConfig, ns:): failed to get resource type: failed to get the resource REST mapping for GroupVersionKind(crd.k8s.amazonaws.com/v1alpha1, Kind=ENIConfig): the cache has not been filled yet&quot;<br>panic: failed to get resource type: failed to get the resource REST mapping for GroupVersionKind(crd.k8s.amazonaws.com/v1alpha1, Kind=ENIConfig): the cache has not been filled yet</pre><pre>goroutine 55 [running]:<br>github.com/operator-framework/operator-sdk/pkg/sdk.Watch(0x5603650891f6, 0x1e, 0x5603650680c6, 0x9, 0x0, 0x0, 0x12a05f200, 0x0, 0x0, 0x0)<br>	/go/pkg/mod/github.com/operator-framework/operator-sdk@v0.0.7/pkg/sdk/api.go:49 +0x46e<br>github.com/aws/amazon-vpc-cni-k8s/pkg/eniconfig.(*ENIConfigController).Start(0xc00049b1a0)<br>	/go/src/github.com/aws/amazon-vpc-cni-k8s/pkg/eniconfig/eniconfig.go:164 +0x196<br>created by main._main<br>	/go/src/github.com/aws/amazon-vpc-cni-k8s/cmd/aws-k8s-agent/main.go:49 +0x54d</pre><p>This means <strong>kube-proxy</strong> is losing the race between setting up iptables, and <strong>aws-node</strong> starting up and trying to use those rules to reach the Kubernetes API.</p><p>By using an <strong>initContainer</strong>, we are able to bridge this problem using a simple script that waits for a connection to the Kubernetes API and thus prevents a costly restart of the container.</p><pre><strong>initContainers:                                <br>- name: init-kubernetes-api<br>  image: busybox:1.28<br>  command:                                  <br>  - sh<br>  - -c<br>  - |<br>      until nc ${KUBERNETES_SERVICE_HOST} 443 -vz -w 1; do <br>        echo waiting for kubernetes service endpoint; sleep 1; <br>      done</strong></pre><p>Adding this snippet to the <strong>aws-node</strong> daemonset, would mean it will only try to start the CNI once <strong>kube-proxy</strong> has already loaded iptable rules, and we can establish a connection to the Kubernetes API.</p><p>In our case we chose to add further gating for other daemonsets we run, such as kiam-agent, etc. to make sure we have <strong>functional readiness, </strong>if you have the same case, you can add a similar wait condition for checking the existence of the kiam iptable rule, or try to connect to any other service endpoint your nodes &amp; workloads depend on, and waiting until these conditions are met as well.</p><p><strong>Update 5/7/21</strong>:<br>Apparently there is an issue where sometimes a pod may come up without `<strong>KUBERNETES_SERVICE_HOST` </strong>being exported by kubelet, in order to avoid this condition, you can either hard-code the Kubernetes API address (172.20.0.1 for EKS) instead of relying on that variable, or just restart the initContainer in cases where the variable is empty if you want a more generic solution, <a href="https://github.com/kubernetes/kubernetes/issues/40973#issuecomment-278847947">here</a> is why this happens.<br>I’ve noticed this only seem to happen on nodes that come up on a cluster that was created moments before.</p><pre># Restart initContainer if env variable is not set<br>if [[ -z &quot;${KUBERNETES_SERVICE_HOST}&quot; ]]; then<br>  echo environment variables not loaded yet, restarting<br>  sleep 1<br>  exit 1<br>fi</pre><h3>Results</h3><p>Nodes are functionally ready within 31 seconds and no more pod restarts are seen!</p><pre>NAME                 STATUS     ROLES     AGE     VERSION<br>ip-10-198-49-19...   Ready      node      31s     v1.18.8-eks-7c9bda</pre><p>So as a result, by fixing these two minor misconfigurations we are able to reduce <strong>3 minutes</strong> out of the time it took nodes to become ready.<br>When you consider the impact on the one-by-one rolling upgrade of nodes for a 100-node scaling group, this would mean ~5hrs saved from the process!</p><p>Read <a href="https://medium.com/keikoproj/rapid-auto-scaling-on-eks-part-2-d094b9b2cd62">Part 2</a> to find out how we used <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html?icmpid=docs_ec2as_help_panel">AWS Warm Pools </a>with <a href="https://github.com/keikoproj/instance-manager">instance-manager</a> in order to speed up the provisioning &amp; bootstrapping stages.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb4de84fc599" width="1" height="1" alt=""><hr><p><a href="https://medium.com/keikoproj/rapid-auto-scaling-on-eks-part-1-bb4de84fc599">Rapid Auto-Scaling on EKS — Part 1</a> was originally published in <a href="https://medium.com/keikoproj">keikoproj</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Instance-Manager: A Kubernetes-Native Worker Node Manager]]></title>
            <link>https://medium.com/keikoproj/instance-manager-a-kubernetes-native-worker-node-manager-345a18ff0428?source=rss-262fc802534------2</link>
            <guid isPermaLink="false">https://medium.com/p/345a18ff0428</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubernetes-operator]]></category>
            <category><![CDATA[gitops]]></category>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <dc:creator><![CDATA[Eytan Avisror]]></dc:creator>
            <pubDate>Tue, 29 Sep 2020 18:33:23 GMT</pubDate>
            <atom:updated>2020-09-29T21:06:05.893Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*diKg4v_DkFbANStwSY2XAg.jpeg" /></figure><p>In Kubernetes today, the concept of managing a <strong>node’s lifecycle</strong> is quite different than other primitives such as pods, services, etc.</p><p>A cluster operator cannot simply submit a YAML file and request the creation or deletion of a node object. Nodes must be externally created or deleted and joined into or removed from a cluster. This ‘bootstrapping’ of a node is what creates the node object. In addition, the concept of a singular node never really makes sense when considering production workloads. Nodes are almost always provisioned in identical sets, whether they serve multiple or dedicated tenants. — This is to address load balancing and high availability requirements.</p><pre>$ kubectl create -f ./my-node.yaml<br>error: nope.</pre><p>The creation of nodes often seems to go against the Kubernetes model of declaratively converging objects into a state that is declared in YAML.</p><p>While there are a variety of existing tools such as Terraform, Managed Node Groups, and Fargate, to manage Kubernetes nodes, none of them are Kubernetes-native. These external tools and custom scripts require their own authentication, which eventually leads to more code to maintain and operate.</p><p>Managing nodes becomes a constant struggle when one has THOUSANDS of nodes to manage, with constant upgrades and updates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ei18A0z5lnJgU9PMmKqZ_A.png" /><figcaption>“Hey, can you roll out this new AMI real quick?”</figcaption></figure><p>At Intuit, we are building one of the largest, fully-managed, multi-tenant Kubernetes platforms in order to reduce friction between Dev, Sec, Ops and development teams. Today, we manage around 220 clusters, and 9000 namespaces across all environments, where each namespace is a tenant service on our platform. — One of the biggest questions we had in getting started was around <strong>how can we easily manage so many nodes? </strong>In particular, how can we provide as much self-service and control as possible to our platform’s tenants, so that they can provision and manage their own instance-groups without bugging a human.</p><h3>Instance Groups</h3><p><a href="https://github.com/kubernetes/kops">KOPS</a> came up with the concept of ‘instance-group’, which can be expressed using YAML. However, this is still not Kubernetes-native because there is no Custom Resource Definition and Controller that can handle an instance-group. About two years ago we decided to start the journey of designing and developing our own solution that can support the use cases we had of running a large-scale managed platform for Intuit. We open-sourced our project so that others faced with similar problems can benefit from our solution.</p><p>Instance-Manager defines a CRD to represent collections of nodes as instance groups. A controller reconciles instance group objects into the Kubernetes infrastructure and bootstraps the nodes to the cluster. The end result is that one can now submit YAML files to provision and manage worker nodes.</p><p>The basic instance group can look like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/efb7024fd52558c8867892f82f6a4a98/href">https://medium.com/media/efb7024fd52558c8867892f82f6a4a98/href</a></iframe><p>The above YAML defines an EC2 scaling group and its configuration. When a user submits this YAML file, Instance-Manager will create and bootstrap this node group to the cluster.</p><pre>$ kubectl get instancegroups<br>NAMESPACE      NAME                STATE   MIN   MAX   AGE<br>my-namespace   my-instance-group   Ready   3     6     10m</pre><pre>$ kubectl get nodes<br>NAME     STATUS   ROLES               AGE   VERSION<br>node-1   Ready    my-instance-group   8m    v1.15.11-eks-af3caf<br>node-2   Ready    my-instance-group   8m    v1.15.11-eks-af3caf<br>node-3   Ready    my-instance-group   8m    v1.15.11-eks-af3caf</pre><p>The controller’s main job is to create the required infrastructure (scaling group, roles, etc.) and then bootstrap the group to the cluster by upserting the role into the ‘aws-auth’ configmap.</p><h3>The API: Provisioner, Strategy, and Configuration</h3><p>The instance-group API has three main sections:</p><ul><li><strong>Provisioner</strong> — This defines the type of provisioner that creates the instance group. In the above example we used the ‘<strong>eks</strong>’ provisioner, which creates a standard scaling group with EC2 instances which are bootstrapped to the EKS cluster. There are other provisioners such as the ‘<strong>fargate</strong>’ provisioner and ‘<strong>eks-managed</strong>’ (for <a href="https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html">managed node groups</a>) with their own respective configurations.</li><li><strong>Strategy</strong> — This defines the upgrade/rotation strategy for your node group. If you make a change that requires rotation e.g. changing the AMI, the strategy defines how this rotation will happen, most basic strategy being the ‘<strong>rollingUpdate</strong>’ strategy which simply terminates one instance at a time according to maxUnavailable you define. There are more complex strategies such as the ‘<strong>crd</strong>’ strategy which lets you submit any custom resource to handle this logic. We actually use this along with <a href="https://github.com/keikoproj/upgrade-manager">upgrade-manager</a> to manage our upgrades.</li><li><strong>Configuration</strong> — This defines the specific configuration for the provisioner you selected, everything ranging from subnets, key-pair, security groups, to the min/max size of the group, userData, volumes, and other supported configurations.</li></ul><p>For a cluster operator/admin, the tasks of managing nodes and node groups are now very easy. Simply submit a YAML and wait for the nodes to join. When you want to modify something like the instanceType or AMI, simply modify the YAML and the controller takes care of reconciling the cluster to the new state.</p><p><strong>But how can we give this control to a cluster tenant</strong>? We can’t expect a cluster tenant to know anything about subnets, key-pairs, etc. We do however expect the tenant to know the instanceType, size, and other sizing or application specific attributes.</p><h3>Configuration Boundaries</h3><p>To differentiate the use cases between cluster admin and namespace tenants, we added a feature that allows the cluster operator/admin to control which resource fields are ‘<strong>restricted</strong>’ and which fields are ‘<strong>shared</strong>’. For example, we would like to allow a tenant to submit a short version of the custom resource, one that cannot modify or control things such as the AMI, Subnets, UserData, and other fields we consider as ‘restricted’. However we do want to allow the tenant to control the instanceType, min/max, labels, volumes, etc. so they can customize to their requirements — again — without bugging a human.</p><p>This feature can be used by creating a config map which defines boundaries and provides the respective default values.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9059eba424429285f32ad74a1f91ffda/href">https://medium.com/media/9059eba424429285f32ad74a1f91ffda/href</a></iframe><p>This allows the user to submit a much simpler custom resource, in order to provision worker nodes.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/20aa1560b9d6157267f49407ceabd071/href">https://medium.com/media/20aa1560b9d6157267f49407ceabd071/href</a></iframe><p>The resulting resource computed by the controller will be a combination of the default values of the ‘restricted’ fields defined in the configmap, along with the merging of the default values of the ‘shared’ fields and the custom resource values if any. However from the tenant perspective, the custom resource is short and only defines what the tenant cares about.</p><p>In the above example, once an admin wants to change a default for the entire cluster (for example, new AMI), he/she can just modify the configmap default value — this will trigger a reconcile &amp; upgrade for all of the cluster instance-groups.</p><p>With the introduction of InstanceGroups as CRD, our next step is to use GitOps to manage node level changes. If you are interested in learning more about GitOps and how it is used in the industry, read about our sister project <a href="https://argoproj.github.io/argo-cd/">ArgoCD</a>.</p><p><strong>In summary, Instance-Manager delivers incredibly convenient and powerful capabilities by turning groups of nodes into Kubernetes-native objects that can be managed like any other Kubernetes object.</strong> Check out the git repo and take it for a spin, or even better — join us by becoming a contributor!</p><p><strong>Project<br></strong> <a href="https://github.com/keikoproj/instance-manager">https://github.com/keikoproj/instance-manager</a></p><p><a href="https://github.com/keikoproj/instance-manager">keikoproj/instance-manager</a></p><p><strong>API Reference<br></strong><a href="https://github.com/keikoproj/instance-manager/blob/master/docs/EKS.md">https://github.com/keikoproj/instance-manager/blob/master/docs/EKS.md</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=345a18ff0428" width="1" height="1" alt=""><hr><p><a href="https://medium.com/keikoproj/instance-manager-a-kubernetes-native-worker-node-manager-345a18ff0428">Instance-Manager: A Kubernetes-Native Worker Node Manager</a> was originally published in <a href="https://medium.com/keikoproj">keikoproj</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bridging the Gap — Kubernetes on AWS & HTTP 5xx]]></title>
            <link>https://medium.com/keikoproj/bridging-the-gap-kubernetes-on-aws-http-5xx-717eb9c7c485?source=rss-262fc802534------2</link>
            <guid isPermaLink="false">https://medium.com/p/717eb9c7c485</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[auto-scaling-groups]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[lifecycle-hook]]></category>
            <dc:creator><![CDATA[Eytan Avisror]]></dc:creator>
            <pubDate>Mon, 02 Dec 2019 19:02:17 GMT</pubDate>
            <atom:updated>2019-12-03T18:43:56.583Z</atom:updated>
            <content:encoded><![CDATA[<h3>Bridging the Gap — Kubernetes on AWS &amp; HTTP 5xx</h3><p>Kubernetes is awesome, no doubt, but sometimes, the lack of awareness between cloud resources and Kubernetes can lead applications to experience HTTP 504/502 errors due to infrastructure related reasons.</p><p>As part of building the Modern SaaS developer platform at Intuit, we faced exactly that — and we hope to share the solution we implemented across our fleet of 160+ Kubernetes clusters which are running today 5xx free.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/0*_YXYj-JQj7D_CE3w" /></figure><h3><strong>Why is this even happening?</strong></h3><p>Before trying to solve this problem, we should first look at the <strong>why.</strong></p><p>Outside of application related 5xx, why exactly were our applications getting 502/504 errors for no obvious reason?</p><ol><li><strong>Node level termination events</strong></li></ol><p>There are many things that can cause nodes to be terminated: whether it’s autoscaling events such as “<strong>AZRebalance</strong>”, manual changes to an autoscaling group’s scale, an EC2 health check that is failing, or any component you may have developed that is requesting to terminate an EC2 instance/Kubernetes node.</p><p>The problem starts with this: AWS Autoscaling doesn’t know anything about the underlying Kubernetes nodes and resources, and as a result can terminate instances without first trying to <strong>drain</strong> <strong>node objects</strong>.</p><p>Outside of draining the nodes from pods that may be running, there might also be a need to <strong>drain ELB/ALB Targets</strong> if you are using kube-proxy to forward traffic between nodes along with alb-ingress-controller managed target groups, you might still need to de-register those instances from all target groups / classic ELBs before you proceed with the EC2 termination.</p><p>Failing to drain an ALB target before EC2-Terminate will almost <strong>always</strong> guarantee some dropped requests according to <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#registered-targets">AWS</a> documentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ovgr2Ns7H9xMC4L6u2ozPQ.png" /></figure><p>2. <strong>Pod level termination events</strong></p><p>Once a pod is terminated due to eviction, scale-down or even a new deployment that is started, a pod goes through a process of termination which is captured <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods">here</a> in great detail. But in essence, when a pod is terminated, a SIGTERM (15) is sent in parallel to the main process of each container and new TCP connections are no longer established, once the grace period is expired a SIGKILL (9) is sent to actually kill the running processes and continue with the pod deletion. The problem is that in the time between SIGTERM and SIGKILL, it is up to the application to gracefully drain and close the already established connections to these processes, and when we fail to do this, we can expect getting 502/504 error for any pod termination that may occur — pod churn is generally much more frequent than node churn, so this may be the first thing you should fix.</p><p>In this story we will mainly focus on <strong>node-level termination events </strong>and how we bridged the gap between AWS and Kubernetes to solve this, but it’s important that you are aware of the pod-level failures mentioned above.</p><h3><strong>The inherent race condition of asynchronous EC2 terminations</strong></h3><p>So now that we know the two main reasons why node terminations are causing 504/502 errors, what can we do about it? Initially we tried to take matters into our own hands..</p><pre><strong>&quot;What if we create some script under /etc/rc0.d/ that causes the node to drain before termination happens?&quot;</strong></pre><p>OR</p><pre>&quot;<strong>What if we use AWS SSM to trigger some action right before the termination happens?&quot;</strong></pre><p>Not only did we ask these questions, we tried using those techniques but they all failed miserably. Whatever we tried to do, EC2 termination was asynchronous and everything we tried to run was an inherent race condition. Sometimes the script ran successfully before the termination happened, and other times it didn’t…until we found out about… <strong>LIFECYCLE HOOKS!!</strong></p><p><a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html">lifecycle-hooks</a> gives an extremely powerful ability — having <strong>synchronous EC2 terminations</strong>. Which means we can hold the termination event until such time we find appropriate to let the EC2 instance go silently into the void.</p><p>This meant we could now bridge the gap between a ‘blind’ autoscaling group, into Kubernetes, and have an awareness of terminating instances within the cluster! We found a few projects that use lifecycle-hooks to drain nodes, but these were pretty old and unmaintained, and didn’t answer the second use-case of draining load balancers.</p><h3><strong>Keiko Lifecycle-Manager</strong></h3><p>We decided to design and build a cluster service that will intercept such hooks from the scaling group using SQS, and then process them by <strong>draining the node</strong>, and then <strong>draining the target </strong>while extending the waiter to prevent the instance from getting terminated.</p><p>Furthermore, we open sourced <a href="https://github.com/keikoproj/lifecycle-manager">lifecycle-manager</a> so anyone in the community can use it to solve these issues in their Kubernetes infrastructure running on AWS.</p><p>Lifecycle-manager is designed to sustain high load of concurrent termination events, as we use it on very large clusters with hundreds of nodes and dozens of target groups.</p><h3><strong>Proving it works</strong></h3><p>The interesting use case we wanted to verify works, was that we were getting 5xx due to ALB targets not getting drained and that lifecycle-manager now eliminates this problem - this was a pretty bad problem because it meant one tenant’s scaling activities were causing 504’s for other tenants when it was scaling down or rebalancing.<br> <br>The reason this was happening is that kube-proxy was still holding connections from the ALBs to the nodes/pods, and because those targets were not getting drained properly, inflight requests get occasionally dropped.</p><p><strong>Test</strong> <strong>Scenario</strong> — Sample application running on dedicated nodes and sustaining +/- 200 TPS of traffic, <strong>nodes on a separate scaling group</strong> (which are doing nothing) has it’s nodes randomly terminated via <strong>terminate-instance-in-auto-scaling-group </strong>API.</p><ul><li>The red line indicates instances of 504 errors</li><li>The orange line indicates terminating EC2 instances</li><li>The blue line indicates HTTP requests</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IxKgU3reJTSVqUABlyamHg.png" /><figcaption>Tests results without lifecycle-manager (5xx visible)</figcaption></figure><pre>Results with lifecycle-manager DISABLED:<br><br>Total Requests: 482941 (+/- 150TPS x 45minutes)<br>ELB HTTP 504: 137 (0.028%)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O3Vyxf0YfA3DXwl93OO3sA.png" /><figcaption>Test results with lifecycle-manager (no 5xx)</figcaption></figure><pre>Results with lifecycle-manager ENABLED:<br><br>Total Requests: 482823 (+/- 150TPS x 45minutes)<br>ELB HTTP 504: 0</pre><h3><strong>Conclusions</strong></h3><ol><li>Always use <strong>terminate-instance-in-auto-scaling-group </strong>instead of <strong>terminate-instances.</strong></li><li>Make sure your app knows how to shutdown gracefully when it gets a SIGTERM.</li><li>Use lifecycle-hooks to drain nodes.</li><li>Use lifecycle-hooks to drain ALB/ELB targets.</li><li><a href="https://github.com/keikoproj/lifecycle-manager">Lifecycle-Manager</a> is awesome! You should star the repo.</li><li><strong>Enjoy a cold drink while your apps are running 5xx free on Kubernetes.</strong></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=717eb9c7c485" width="1" height="1" alt=""><hr><p><a href="https://medium.com/keikoproj/bridging-the-gap-kubernetes-on-aws-http-5xx-717eb9c7c485">Bridging the Gap — Kubernetes on AWS &amp; HTTP 5xx</a> was originally published in <a href="https://medium.com/keikoproj">keikoproj</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>