In Kubernetes, the OOMKilled error (also indicated by exit code 137) means that a container within a pod was terminated because its memory usage exceeded the defined limit. A pod can specify a memory limit – the maximum amount of memory a container is allowed to use; if a container uses more memory than its memory limit, it is terminated with an OOMKilled status. A pod can be terminated with an OOMKilled status if the pods on a node exceed the defined limit.
Important: To ensure system integrity, identify the root cause of the OOMKilled error and address it appropriately; simply increasing the memory limit might only mask the problem, and could result in a more catastrophic failure at a later time.
There are many reasons why a container or a pod might be terminated with an OOMKilled error, but a systematic approach that includes the following should help to identify the specific issue:
limits.memory field in the pod specification.These steps should help you resolve an OOMKilled error in your Kubernetes environment and prevent it from happening in the future; however, it is important to remember that every situation is unique and may require a different approach to resolve the error.
On This Page
Search for a command to run...