## KubeCon + CloudNativeCon 2022 NA
## Title - Remain Calm and Manage Node Pressure
## Speakers
Akshat Khanna, Unnati Mishra
## Abstract
You may have experienced resource shortages in the past, causing your computer to slow down and hang occasionally. The same thing happens with Nodes in Kubernetes, but the best part is that we have Kubelet to rescue us. The kubelet is in charge of keeping track of resources on the nodes in our cluster, such as CPU, RAM, disc space, and filesystems. It performs node pressure eviction, which prevents your pods from running out of resources by reclaiming them once they reach a certain level of usage. The kubelet can fail one or more pods on a node to reclaim resources and prevent starvation.
Node-pressure eviction is the process of a kubelet killing pods on its own to reclaim resources on nodes. This technique is commonly used to relieve unwanted pressure on nodes and reclaim resources in order to avoid starvation. In this talk, we'll go over Node Pressure Eviction, different eviction signals, two types of eviction thresholds, pod selection for kubelet eviction, minimum eviction reclaim condition, and eviction practices.
We'll be covering the challenges that we faced in the production environment while deploying heavy, large-scale workloads on a Kubernetes cluster and how node-presure eviction handled them.
## Outline
- Introduction to Node Pressure Eviction
- A brief overview, its significance, and its need in kubernetes ecosystem.
- Differentiating factor from API-initiated eviction.
- Multiple parameters used by Kubelet to make eviction decisions
- Eviction signals
- We will discuss about various eviction signals and how kubelet gets the value of these signals.
- Eviction thresholds
- Under this topic we have two types of eviction thresholds:
- Soft eviction thresholds
- Hard eviction thresholds
- Selection of pods for kubelet eviction
- As soon as the node-level eviction signal falls below the threshold set by the kubelet, end-user pods will be kicked out.
- We will cover the various parameters to determine order of pod eviction.
- Minimum eviction reclaim
- How and when the Kubelet hits the configured eviction thresholds multiple times and retriggers eviction multiple times.
- Best Practices for Node Eviction
- This will be the final topic and we'll cover the optimal ways for node eviction and its policies.
## Benefits to the Ecosystem
The talk will provide a better and easy understanding of node-pressure eviction. It will also help the audience to have a clear look on how and why the kubelet is invloved in the process of eviction and how node-pressure eviction is different from API-initiated eviction.
As Kubernetes developers, we've probably dealt with pods being evicted suddenly. Troubleshooting and fixing the reason behind the eviction might be a challenging task for developers unfamiliar with Kubernetes' resource management side.
This talk makes it easier to balance your cluster once you understand how and when pods are evicted, and you will be able to properly manage your Kubernetes resources if you understand all of the options and your workload.
We hope that after attending our talk, the audience will be able to evict their pods easily and know more about kubelets.
## Links & References
- [A guide to Kubernetes pod eviction](https://opensource.com/article/21/12/kubernetes-pod-eviction)
- [Kubelet- GitHub](https://github.com/kubernetes/kubelet)