kubernetes-sigs / descheduler

Descheduler for Kubernetes
https://sigs.k8s.io/descheduler
Apache License 2.0
4.23k stars 645 forks source link

Howto test RemovePodsViolatingInterPodAntiAffinity ? #1382

Open khalid-lemghari opened 2 months ago

khalid-lemghari commented 2 months ago

Hi Team,

Kube-descheduler provides a good documentation about howto configure its policy, evictor and strategy plugins. But it doesn't describe howto test strategies.

As PoC, I need to test RemovePodsViolatingInterPodAntiAffinity strategy ! And you documented:

This strategy makes sure that pods violating interpod anti-affinity are removed from nodes. For example, if there is podA on a node and podB and podC (running on the same node) have anti-affinity rules which prohibit them to run on the same node, then podA will be evicted from the node so that podB and podC could run. This issue could happen, when the anti-affinity rules for podB and podC are created when they are already running on node.

So, how can I simulate that issue above ?

My best regards,

khalid-lemghari commented 2 months ago

I link that issue to https://github.com/kubernetes-sigs/descheduler/issues/1345 !