0

So, let's say there's a cluster node, with 4 CPU cores.

It's running two pods. Each pod sets the CPU requirement at: 500m, but the CPU limit at 4000m.

running kubectl describe node <noode> tells me CPU limit is at 8 (200%)

I understand it claims 200% because I have two pods, each setting its CPU limit at 4 CPU cores.

Is that just semantics or is there a potential issue? I mean, if both pods need to burst to 3 CPU cores (below each one's limit) it would not be physically possible, and they'd have to settle with less.

Is there a potential issue with the sum of all pod limits, exceeding their host node CPU capability? or is just an indication of what's been asked as CPU limit, knowing it may not be able to serve that -- after all, pods may not be aware of each other being in the same node.

3

This works exactly in the way you're describing. You have two pods which each have a limit of 4 CPUs scheduled on the same node; so the total of the limits on that node is 8 CPUs; which is 200% of the node's physical capacity; and if the two nodes combined go over the node's physical abilities then the host kernel will time-slice available resources. For CPU there's nothing especially wrong with this.

The exact same presentation in the kubectl describe node output applies to memory, and there is the potential for trouble with that: if your pod limits add up to 200% of a node's physical memory, and together they exceed the physical capacity, then the host kernel will respond by killing one of them off. Lower requests will allow more things to be potentially scheduled on the same node, but keeping requests closer to limits gives you a better chance of them staying running long-term.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.