Kubernetes uses the Linux kernel feature OOMKiller to manage container lifecycles.
A pod can specify a memory limit and memory request.
A pod that is killed due to a memory issue is not necessarily evicted from a node — if the restart policy on the node is set to “Always”, it will try to restart the pod.
If a pod has been killed you can describe the pod and check the Exit Code, and if the Exit Code is 137 this indicates the pod was oom killed.
kubectl describe pod [name] > /tmp/troubleshooting_describe_pod.txt
State: Running
Started: Thu, 10 Oct 2019 11:14:13 +0200
Last State: Terminated
Reason: OOMKilled
Exit Code: 137
Common causes:
Resolutions: