I have 20 worker nodes cassandra cluster in kubernetes where each pod scheduled in seperate worker node, when restart happened to multiple pods in case of threshold limit reached like cpu/Memory then pods are not scheduling to same worker node everytime. To resolved that I have to kill each pod forcefully and once all killed then I have to change replica back to normal
Is there any possible solution that I can fix pod scheduling to the same node every time. In statefulset pod name are fixed every time.
I tried to set nodeaffnity some how it was not executed becaue of statefulset . I am using deployment type to schedule statefulset.