# ECK pod re-scheduling explanation

**URL:** <https://discuss.elastic.co/t/eck-pod-re-scheduling-explanation/234908>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [May 29, 2020, 11:14am UTC](https://discuss.elastic.co/t/eck-pod-re-scheduling-explanation/234908 "2020-05-29T11:14:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Virajsl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/virajsl/32/48327_2.png) [@Virajsl](https://discuss.elastic.co/u/Virajsl)\
**Post date:** [May 29, 2020, 11:14am UTC](https://discuss.elastic.co/t/eck-pod-re-scheduling-explanation/234908/1 "2020-05-29T11:14:11Z")

</div>

I would be grateful if someone can explain behavior for following scenario.

k8s cluster with 3 master nodes 6 worker nodes. 3 nodes from workers are selected to run dedicated master ( these nodes have calculated spec for data in cluster) . If one k8s node failed, does eck re-schedule master on available nodes ? ( in this case scheduling on a node which already has a master pod running )

---

<div class="post-metadata">

**Author:** ![sebgl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebgl/32/48702_2.png) [@sebgl](https://discuss.elastic.co/u/sebgl)\
**Post date:** [May 29, 2020, 1:05pm UTC](https://discuss.elastic.co/t/eck-pod-re-scheduling-explanation/234908/2 "2020-05-29T13:05:58Z")

</div>

Hey @Virajsl,

If a k8s node crashes/fails, and was hosting some Elasticsearch Pods, they will automatically be rescheduled on other available k8s nodes.  
That's as long as there is another node available with compatible scheduling constraints. If you have special affinity rules or you are using local persistent volumes with affinity to a particular host, then the Pod will stay Pending.

> 3 nodes from workers are selected to run dedicated master

I guess you're specifying this through affinity rules in the podTemplate, or through a `nodeSelector`? If those rules allow multiple masters to run on the same host then you should be fine.

Let me know if that makes sense. If not, can you share your elasticsearch.yml spec if it contains custom affinity rules?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 4, 2022, 8:00am UTC](https://discuss.elastic.co/t/eck-pod-re-scheduling-explanation/234908/3 "2022-11-04T08:00:19Z")

</div>


