After an OOM how can I detect the pod that caused it?

落花浮王杯 提交于 2019-12-07 11:47:11

问题


I had some issues running some pods on a cluster, I want to know the way to detect which pod (and rc) is causing OOM on my nodes after the exception is thrown. I cannot access the node to check logs and kubectl describe node doesn't give me much information about this.

Thanks :)


回答1:


Have you try running kubectl get events --watch to monitor the events on k8s and monitor the pod as well with kubectl logs -f podname




回答2:


The only way I found to track what is happening is waiting before an OOM is thrown on the web UI link and tracking the pod's memory used (I had a node with 1.75 GB and a pod that was consuming 1.3GB). I tried to see the memory allocation with kubectl describe node [nodename] but I couldn't.



来源:https://stackoverflow.com/questions/38257446/after-an-oom-how-can-i-detect-the-pod-that-caused-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!