This small program doest the only thing kubernetes-sigs/descheduler can't do. It will evict Pods to better nodes, based on preferredDuringSchedulingIgnoredDuringExecution
nodeAffinity
terms.
There're at least two rotten unmerged PRs in the Descheduler repository:
In fact, this functionallity will be never implemented in Descheduler.
...unless descheduler can make the same decision as kube-scheduler, it can cause this kind of ineffective pod evictions. I have no good idea to overcome this difficulty. Copying all scheduling policies in kube-scheduler to descheduler is not realistic.
However, there're real world use-cases, where such dumb eviction can be usefull.
For exmaple, when a project is small and there's a need to use some special Spot instance node type (such as Tesla p2.xlarge
).
When this instance is taken back from you by AWS, but your project can afford some performance degradation for a short period of time (untill there's a new node of p2.xlarge
given), kube-scheduler
will place it on some other node available at the moment.
But when finally new Tesla node will join the cluster, there's nothing to schedule your project's Pod back to it.
Here kube-better-node can be usefull.
helm repo add decayofmind https://decayofmind.github.io/charts/
helm install kube-better-node decayofmind/kube-better-node