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 resources.limits
.
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#how-pods-with-resource-limits-are-run
It specifies that if a pod's footprint grows to exceed its limits
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?
Q: What happens if a Kubernetes pod exceeds its memory resources 'limit'?
It will be restarted.
Unlike Pod eviction, if a Pod container is OOM killed, it may be restarted by the
kubelet
based on itsRestartPolicy
.
You can Configure Out Of Resource Handling for your Node
.
Evicting end-user Pods
If the
kubelet
is unable to reclaim sufficient resource on the node,kubelet
begins evicting Pods.The
kubelet
ranks Pods for eviction first by whether or not their usage of the starved resource exceeds requests, then by Priority, and then by the consumption of the starved compute resource relative to the Pods’ scheduling requests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With