How to make sure Kubernetes autoscaler not deleting the nodes which run a specific pod

How to make sure Kubernetes autoscaler not deleting the nodes which run a specific pod

I was running a Kubernetes cluster(AWS EKS one) with Kubernetes Autoscaler so that Cluster will autoscale according to the resource request within the cluster. Also, the cluster will shrink no of nodes when the load is reduced.

I was running a Kubernetes cluster(AWS EKS one) with Kubernetes Autoscaler so that Cluster will autoscale according to the resource request within the cluster. Also, the cluster will shrink no of nodes when the load is reduced.

Having Kubernetes Autoscaler has brought great agility to our cluster and It helped us to save money on our cloud bills and also dev efforts.

But when running several workloads together, We noticed sudden pod deletion and replacement to different nodes. We identified an issue that happens during the Kubernetes AutoScaler scale-down process.

Due to the nature of the solution, We can't afford such sudden pod deletion and required to make sure some of our critical worker pods running without any issue until that Job fully completes.

In summary, our problem was Kubernetes Autosclaer can select any node from Kubernetes cluster for deletion when It try to scale down the cluster.

So we wanted to control this behavior such as asking Autoscaler to stop deleting nodes that run a specific pod. For example, If a node runs the Jenkins master pod, Autoscaler should skip that node and delete other matching nodes from the cluster.

kubernetes-cluster kubernetes

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

50+ Useful Kubernetes Tools for 2020 - Part 2

Our original Kubernetes tool list was so popular that we've curated another great list of tools to help you improve your functionality with the platform.

Kubernetes in the Cloud: Strategies for Effective Multi Cloud Implementations

This article explains how you can leverage Kubernetes to reduce multi cloud complexities and improve stability, scalability, and velocity.

Kubernetes Cluster Federation With Admiralty

Learn all about what a Kubernetes Cluster Federation is, how to set one up, and how to use Admiralty to schedule workloads across clusters. The Kubernetes cluster federation is a mechanism to provide one way or one practice to distribute applications and services to multiple clusters. One of the most important things to note is that federation is not about cluster management, federation is about application management.

Create a Local Kubernetes Cluster (K8s#3)

In this article, we go deep with the Kubernetes Series. We learn will How to get a local Kubernetes cluster up and running. And I want to show you 2 ways to setup a local Kubernetes cluster, that is the base you must have to start working with Kubernetes.

Webinar: Things to consider to operate a Multi-Tenant Kubernetes Cluster

In this webinar, we would like to introduce multiple approaches that can be taken to provide multi-tenancy in the kubernetes cluster. We will also talk about how others in the communities are doing to achieve multi-tenancy. We’ll analyze pros and cons of different approaches and share specific use-cases that fit each approach.