Kubernetes - Scheduling pod replicas on nodes as per the resources available

7/22/2019

I have a node with 64 cores and another one with just 8. I need multiple replicas of my Kubernetes pods ( at least 6 ) and my 8-core node can only handle 1 instance. How could I ask kubernetes to schedule the rest (5) on the more powerful node ?

It would be good if I could do a scale-up only on the required node, is that possible?

-- Chillax
kubernetes
kubernetes-helm
kubernetes-pod

2 Answers

7/22/2019

In general, you should use resources.requests definitions in your workload in order to let the scheduler know about the requirements of your application. With this way the scheduler will take care of scheduling the pods where there are resources available.

-- vasrem
Source: StackOverflow

7/23/2019

While kubernetes is intelligent to spread pods on nodes with enough resources (CPU cores in this case), the following ways can be used to fine-tune how pods can be spread/load-balanced on the nodes in a cluster:

-- Vikram Hosakote
Source: StackOverflow