<p>I have created a Kubernetes cluster of 2 nodes and one master on CentOS 7. When I use <code>kubectl get nodes</code>, it lists the nodes and everything seems to be working.</p>

<p>My question is: Will the cluster automatically balance the resources now between the nodes? I mean, let's say I installed a nginx web server with WordPress on the master node (which has 512MB of memory), if the memory usage is almost full on the master, will it automatically now depend on the nodes according to its needs? Or should I do something manual?</p>

<p>And does it also balance the CPU load between the nodes?</p>

<p>The key point that sfgroups mentioned is that a pod cannot be split between nodes, so there is no "balancing of resources" when resources are exhausted on a node.  Your process running in the pod will be OOM killed by the kernel if it hits its memory cgroup limit, and it will be throttled if it hits its CPU cgroup limit.  </p>

<p>You need pods that fit onto your nodes with room to spare for the daemons that run on every node (kubelet and kube-proxy).  </p>

<p>The only automatic things that kubernetes does (related to your question) are: 1) scheduling pods on nodes where they fit, 2) autoscaling pods (when running a horizontal pod autoscaler), and 3) autoscaling nodes (when running a cluster autoscaler).  You might also be interested in the behavior of the replicaset and deployment, which control the number of pods that are present in the cluster for a specific application.  </p>
