<p>First As describe here <a href="https://stackoverflow.com/questions/60079822/kubernetes-pods-and-cpu-limits">Kubernetes: Pods and cpu limits</a> when we do not specify the limit of CPU a pod can use all the CPUs of the node. Is this also apply for memory? Means does pod starts using the all memory when it required when we do not specify the limit?</p>
<p>Second Let's consider we have a single worker node with 2GB Memory, we have 8 pods deployed on this, is it correct to assign 256Mi request and limit to each of these 8 pods? Is it recommended to apply same limit on all pods?</p>
<p>Third what would happen if I want to create a new pod with same request and limit 256Mi? Will it always stay in pending state?</p>

Vinay Sorout
<p><code>Means does pod starts using the all memory when it required when we do not specify the limit</code></p>
<p>Short answer is Yes. You probably want to look into QoS as well, pod without request/limit are assigned BestEffort; which will be first to evict when system is under stress.</p>
<p><code>is it correct to assign 256Mi request and limit to each of these 8 pods? Is it recommended to apply same limit on all pods?</code></p>
<p>If your pod needs that amount of memory to function then it is not a question of correct/incorrect. You should plan your cluster capacity instead.</p>
<p><code>Will it always stay in pending state?</code></p>
<p>You won't be able to use ALL memory in reality; the fact that you have many other programs running (eg. kubelet) on the same node. When you specified resources and there is no node that could meet this requirement your pod will enter pending state. If you don't specified the resource the scheduler will allocate your pod to run on one of the available node - which your pod may get kick-out when there is a higher priority, better QoS request come in, or simply suicide as the node won't satisfy the resources need.</p>
