Execution of OOMkill

Hi experts, I have some questions about OOMkill action:

  • Does kubelet kill it right after it notices there is a pod on the list to be killed? or leave it for a while if the node has enough memory?
  • OOMkill can be done by OS itself before kubelet knows it? if then no log left?
  • I think it’s not a thing can be done by K8s but, any way we can limit container’s memory use not by kill?

Any comments would be very grateful.
BR// Honser