Replies: 3 comments 3 replies
-
Is it a container being restarted? In that case the pod spec (and selected node) doesn't change, so it won't be moved to any other node, as it has already reserved the resources on this node. There is no "pod restart", however pod can be recreated (if it was removed or evicted). In that case the scheduler selects new pod for the pod, see https://docs.okd.io/4.13/nodes/scheduling/nodes-scheduler-about.html about the features it takes into account If you want to "pin" the pod to a particular node, it needs to have nodeSelector set, otherwise the scheduler would assume that recreating this pod on a new node is a valid option. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Yes the container gets restarted because of OOM. But the POD stays on the same node and isn't recreated on a different node. I think this behavior changed. Is this true?
Thanks for the clarifications. I should have put "" around restarted. I meant recreated sry. The Sheduler is just fine, thanks for the docs, if the default is "LowNodeUtilization".
No that is not what I wan't. If a container is restarted (for whatever reason) the whole POD should be recreated. Regards Philipp |
Beta Was this translation helpful? Give feedback.
-
Hi, investigating a little further I found out kubelet is normaly evicting a POD if the POD uses to much memory: conditions:
- type: DisruptionTarget
status: 'True'
lastProbeTime: null
lastTransitionTime: '2023-12-12T15:00:44Z'
reason: TerminationByKubelet
message: >-
The node was low on resource: memory. Threshold quantity: 100Mi,
available: 74416Ki. Container TESTPOD was using 25208660Ki, request is 14G,
has larger consumption of memory. But this doesn't happen to the PODs that are causing us trouble. The OS OOMKiller is killing the Containers not kubelet. The above behavior is what I expect, because if the OS OOMKiller starts to act, I think its to late. Is there a way to configure kubelet to be more restrictive (or faster than the OS OOMKiller) so PODs get evicted and not container OOM killed? So the goal should be kubelet doing the memory "management" and not the OS, any thoughts about this? Regards Philipp |
Beta Was this translation helpful? Give feedback.
-
Hi,
this is just a question, not really a Bug Report.
We are running "4.13.0-0.okd-2023-09-30-084937". With this Release I have seen that PODs are no longer restartet and relocated to a "better" Node, with "more" resources. Only the container in the pod are restartet and the POD stays on the same worker node.
Is this expected behavior? Can we somehow "activate" the old behavior? Or can you give us a hint to the documentation, please,
regards Philipp
Beta Was this translation helpful? Give feedback.
All reactions