A Deep Dive into HighNodeUtilization and LowNodeUtilization Plugins with Descheduler
Recently, I have been researching descheduler, primarily to address CPU hotspots on part of nodes in kubernetes clusters. This issue arises when there is a significant difference in CPU usage among nodes, despite the even distribution of pod requests across nodes. As we know, kube-scheduler is responsible for scheduling pods to nodes, while descheduler removes pods, allowing the workload controller to regenerate pods. This, in turn, triggers the pod scheduling process to allocate pods to nodes again, achieving the goal of pod rescheduling and node balancing.
The descheduler project in the community aims to address the following scenarios:
- Some nodes have high utilization and need to balance node utilization.
- After pod scheduling, nodes’ labels or taints do not meet the pod’s pod/node affinity, requiring pod relocation to compliant nodes.
- New nodes join the cluster, necessitating the balancing of node utilization.
- Pods are in a failed state but have not been cleaned up.
- Pods of the same workload are concentrated on the same node.
Descheduler uses a plugin mechanism to extend its capabilities, with plugins categorized into Balance (node balancing) and Deschedule (pod rescheduling) types.