<p>I am searching for an specific information regarding kubernetes requests and limits and still didn't find an answer or just didn't understand quite well. Say I've defined two containers A and B for a single pod, both with its resources limits and requests:</p>
<p>A:
RAM request: 1Gi
RAM limit: 2Gi
B:
RAM request: 1Gi
RAM limit: 2Gi</p>
<p>So, we have a PoD limit of 4Gi (total). Suppose the A container exceeded the limit (say +1Gi), but B is consuming 64Mi only. So, my questions are:</p>
<ol>
<li>What happens to the pod? Is it evicted?</li>
<li>Is the container A restarted?</li>
<li>Is the container A allowed to use the B's available RAM?</li>
</ol>
<p>Thanks!</p>

<blockquote>
<p>What happens to the pod? Is it evicted?</p>
</blockquote>
<p>If the memory limit of a container is exceeded, the kernel's OOM killer is invoked and terminates the container's process. The Pod then starts a new container on the same Node.</p>
<p>(CPU limits use a different mechanism (CFS Bandwidth Control) that throttles the processes' CPU cycles instead of terminating the process.)</p>
<blockquote>
<p>Is the container A restarted?</p>
</blockquote>
<p>Yes.</p>
<blockquote>
<p>Is the container A allowed to use the B's available RAM?</p>
</blockquote>
<p>The memory is tracked separately for each container. They are not pooled together into the same limit.</p>
