How to have uneven distribution of pods across worker nodes using topologySpreadConstraints

Posted on

Dear Community

Openshift 4.13

We have 4 Worker nodes with 2 Nodes each in 2 Failure Domains

2 Worker nodes in failure Domain A
2 Worker nodes in failure Domain B

We have a 3 replica cassandra database workload to run on these worker nodes

How can we ensure that 2 of the 3 Cassandra pods always run on the worker nodes of failure Domain A ?

is this possible with pod topology spread constraints ?

If yes , how we should we set the maxskew & when unsatisfiable parameters ?

Appreciate your quick response in this regard

Responses