Kubernetes users, take note! OOMKilled errors can occur when containers exceed memory limits or access unavailable resources on a node. Here's what you need to know:

* OOMKilled is flagged by exit code 137 and indicates that pods must use less memory than available on the node.

* Check the Events section of the describe pod for messages indicating memory issues.

* Note that even if a pod is terminated due to memory exhaustion, it may still restart if the node's restart policy is set to 'Always'.

* Use commands like `kubectl get pod -o jsonpath='{.status.qosClass}'` and `kubectl get pod -o jsonpath='{.spec.containers[0].oomScoreAdmission}'` to inspect QoS classes and oom scores.

By understanding OOMKilled errors, you can better troubleshoot and optimize your Kubernetes deployments.

Source: https://dev.to/pareek/how-to-fix-oomkilled-3mp6

Reply to this note

Please Login to reply.

Discussion

No replies yet.