How to add rule to migrate on node failure in k8s How to add rule to migrate on node failure in k8s kubernetes kubernetes

How to add rule to migrate on node failure in k8s


Normally scheduler takes that under account and tries to spread your pods, but there are many reasons why the other node might be unschedulable at time of starting the pods. If you don't need to have multiple pods on the same node, you can force that with Pod Anti Affinity rules, with which you can say that pods of the same set of labels (ie. name and version) can never run on the same node.