I'm running Kubernetes Jobs
in which I set limits and requests both to the same number of CPUs. In some of these jobs I'm occasionally seeing OutOfcpu
errors
When I kubectl describe pods PODNAME
I see the following message:
Pod Node didn't have enough resource: cpu, requested: 8000, used: 11453, capacity: 16000
That pretty clearly indicates why the OutOfcpu
occurred.
But my Limits.cpu == Requests.cpu == 8
.
Limits: cpu: 8 ephemeral-storage: 500Gi memory: 10Gi Requests: cpu: 8 ephemeral-storage: 300Gi memory: 2Gi
So as far as I understand I should have been throttled at 8 CPUs and fenced off from the node running out of CPU resources for the pod.
I've only noticed this recently, our Kubernetes version is 1.22.5 as of a reasonably recent upgrade.