Worker POD/Load Rebalancing In Kubernetes

9/5/2018

Consider the following scenario with kubernetes network (1 master 2 worker nodes)

If one of the worker node instance is shutdown kubernetes has the feature of rescheduling all the pods from failed/shutdown worker to another worker from the network.

If the failed worker is again up and running it will have no pods as the pods are already rescheduled on some other worker nodes so does kubernetes has any configuration setting or parameter setting to manage this POD/LOAD balancing scenario

-- aditya chaphekar
docker
kubernetes

2 Answers

9/5/2018

Yes, what you describe is exactly what should happen.

Solutions to this come in different flavors, ie. :

-- Radek 'Goblin' Pieczonka
Source: StackOverflow

9/5/2018

"does kubernetes has any configuration setting or parameter setting to manage this POD/LOAD balancing scenario?"

Kubernetes is a quite complex system, and yes, it has a lot of parameters to configure. I think to answer your question you will have to dig more on how the scheduler works.


From Advanced Scheduling in Kubernetes:

The Kubernetes scheduler’s default behavior works well for most cases – for example, it ensures that pods are only placed on nodes that have sufficient free resources, it ties to spread pods from the same set (ReplicaSet, StatefulSet, etc.) across nodes, it tries to balance out the resource utilization of nodes, etc.

Custom Schedulers

If the Kubernetes scheduler’s various features don’t give you enough control over the scheduling of your workloads, you can delegate responsibility for scheduling arbitrary subsets of pods to your own custom scheduler(s) that run(s) alongside, or instead of, the default Kubernetes scheduler.

-- tgogos
Source: StackOverflow