Member-only story
DevOps in K8s — Descheduler
Note, full “DevOps in K8s” mind map is available at: “DevOps in K8s Mind Map”
What is K8s Descheduler
From the perspective of the kube-scheduler
, it utilizes a series of algorithms to identify the most suitable nodes for running Pods. When a new Pod needs to be scheduled, the scheduler makes the best decision based on its real-time assessment of the resources within the K8s cluster.
However, K8s clusters are inherently dynamic. Changes, such as evicting Pods for node maintenance, can cause imbalances over time. After maintenance, previously evicted Pods do not automatically return to their original node because Pods, once bound to a node, do not trigger re-scheduling.
While it is possible to manually balance the cluster by deleting certain Pods to prompt re-scheduling, this approach is cumbersome and not efficient. To address resource underutilization or waste in the cluster, the descheduler component can be employed for optimizing Pod scheduling.
The Descheduler is typically run as a periodic job that examines the state of the cluster and moves Pods as necessary. Unlike kube-scheduler
, which takes care of initial Pod placement, the Descheduler doesn’t perform any scheduling activities itself. Instead, it…