<p>I have created a K8S cluster of 10 machines. which is having cpus of different memory and cores (4 core 32 GB, 4 core 8 GB). Now when I am deploying any application on the cluster it is creating pods in a random manner. It is not creating the POD on the basis of memory or load.
How is Kubernetes master distributing the Pods in the cluster? I am not getting any significant answers. How can i configure the cluster for best use of resources?</p>

Navneet Nandan Jha
<p>Kubernetes uses a <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kube-scheduler/" rel="nofollow noreferrer">scheduler</a> for deciding which pod is started on which node. One improvement is to tell the scheduler what your pods need as minimum and maximum resources. </p>

<p>Resources are Memory (measured in bytes), CPU (measured in cpu units) and ephemeral storage for things like emtpy dir(with 1.11). When you provide these information for your deployments Kubernetes can make better decisions where to run.
Without these information a nginx pod will be scheduled the same way as any heavy Java application.</p>

<p>The limits and requests config is described <a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/" rel="nofollow noreferrer">here</a>. Setting both limits is a good idea to make scheduling easier and to avoid pods running amok and using all node resources.</p>

<p>If this is not enough there is also the possibility to add a custom scheduler which is explained in this <a href="https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/" rel="nofollow noreferrer">documentation</a>  </p>
