Descheduling Pods in Kubernetes

Luca Berton
7 min readOct 30, 2024

Descheduling is the process of evicting Pods from Nodes to rebalance resources or address certain scheduling constraints in a Kubernetes cluster. The descheduler operates after Pods are scheduled, and it helps maintain an optimal distribution of Pods across the cluster based on current state and policies. Kubernetes provides a Descheduler component to perform descheduling, especially when the default scheduler’s placement decisions become suboptimal over time.

Section 1: When to Use Descheduling

The descheduling process is useful in various scenarios:

  • Resource Imbalance: When certain Nodes are over-utilized, and others are under-utilized, descheduling can help by evicting and redistributing Pods.
  • Node Affinity/Anti-Affinity Violations: If a Pod is no longer adhering to its affinity/anti-affinity rules due to changes in the cluster.
  • Topology Spread Constraints Violations: If Pods are no longer evenly spread across Nodes or availability zones.
  • Taints and Tolerations Violations: When a Node’s taints have changed and certain Pods should no longer be running on that Node.
  • Pod Aging: Evicting older, long-running Pods to allow new Pods to be scheduled.

Section 2: How the Kubernetes…

--

--

Luca Berton
Luca Berton

Written by Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday

No responses yet