<p>What I see: Kubernetes takes into account only the memory used by its components when scheduling new Pods, and considers the remaining memory as free, even if it's being used by other system processes outside Kubernetes. So, when creating new deployments, it attempts to schedule new pods on a suffocated node.</p>

<p>What I expected to see: Kubernetes <strong>automatically</strong> take in consideration the total memory usage (by kubernetes components + system processes) and schedule it on another node.</p>

<p>As a work-around, is there a configuration parameter that I need to set or is it a bug?</p>

<p>Yes, there are few parameters to allocate resources:
You can allocate memory and CPU for your pods and allocate memory and CPU for your system daemons manually. <a href="https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#example-scenario" rel="nofollow noreferrer">In documentation</a>  you could find how it works with the example:</p>

<h2>Example Scenario</h2>

<p>Here is an example to illustrate Node Allocatable computation:</p>

<ul>
<li>Node has  <code>32Gi</code>  of  <code>memory</code>,  <code>16 CPUs</code>  and  <code>100Gi</code>  of  <code>Storage</code></li>
<li><code>--kube-reserved</code>  is set to  <code>cpu=1,memory=2Gi,ephemeral-storage=1Gi</code></li>
<li><code>--system-reserved</code>  is set to  <code>cpu=500m,memory=1Gi,ephemeral-storage=1Gi</code></li>
<li><code>--eviction-hard</code>  is set to  <code>memory.available&lt;500Mi,nodefs.available&lt;10%</code></li>
</ul>

<p>Under this scenario,  <code>Allocatable</code>  will be  <code>14.5 CPUs</code>,  <code>28.5Gi</code>  of memory and  <code>98Gi</code>  of local storage. Scheduler ensures that the total memory  <code>requests</code>  across all pods on this node does not exceed  <code>28.5Gi</code>  and storage doesn’t exceed  <code>88Gi</code>. Kubelet evicts pods whenever the overall memory usage across pods exceeds  <code>28.5Gi</code>, or if overall disk usage exceeds  <code>88Gi</code>If all processes on the node consume as much CPU as they can, pods together cannot consume more than  <code>14.5 CPUs</code>.</p>

<p>If  <code>kube-reserved</code>  and/or  <code>system-reserved</code>  is not enforced and system daemons exceed their reservation,  <code>kubelet</code>  evicts pods whenever the overall node memory usage is higher than  <code>31.5Gi</code>  or  <code>storage</code>  is greater than  <code>90Gi</code></p>

<p>You can allocate as many as you need for Kubernetes with flag <code>--kube-reserved</code>  and for system with flag <code>-system-reserved</code>. </p>

<p>Additionally, if you need stricter rules for spawning pods, you could try to use <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/" rel="nofollow noreferrer">Pod Affinity.</a> </p>
