<p>There's a bit of a vagueness in the Kubernetes documentation about what happens if a pod's memory footprint increases to a point where it exceeds the value specified under <code>resources.limits</code>.</p>

<p><a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#how-pods-with-resource-limits-are-run" rel="noreferrer">https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#how-pods-with-resource-limits-are-run</a></p>

<p>It specifies that if a pod's footprint grows to exceed its <code>limits</code> value, it "might be" terminated. What does the "might be" mean? What conditions would result in it being terminated vs which ones would allow it to continue on as-is?</p>

C. Russell
<blockquote>
  <p>Q: What happens if a Kubernetes pod exceeds its memory resources 'limit'?</p>
</blockquote>

<p>It will be restarted.</p>

<blockquote>
  <p>Unlike Pod eviction, if a Pod container is OOM killed, it may be restarted by the  <code>kubelet</code>  based on its  <code>RestartPolicy</code>.</p>
</blockquote>

<p>You can <a href="https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/" rel="noreferrer">Configure Out Of Resource Handling</a> for your <code>Node</code>.</p>

<blockquote>
  <h3>Evicting end-user Pods<a href="https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/#evicting-end-user-pods" rel="noreferrer"></a></h3>
  
  <p>If the  <code>kubelet</code>  is unable to reclaim sufficient resource on the node,  <code>kubelet</code>  begins evicting Pods.</p>
  
  <p>The  <code>kubelet</code>  ranks Pods for eviction first by whether or not their usage of the starved resource exceeds requests, then by  <a href="https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/" rel="noreferrer">Priority</a>, and then by the consumption of the starved compute resource relative to the Pods’ scheduling requests.</p>
</blockquote>
