1

Let’s assume the following scenario:

I have a cluster with 100 CPU cores and 100 Pods each having a request of 1 CPU.

If I schedule the 101st Pod if a request of 1 CPU this will no longer be schedulable, as per my understanding.

Now, further assume that I as cluster operator have observed that pods on average only consume .3 CPU in reality. It would be beneficial if scheduling further pods instances was possible.

Can I somehow apply a global correction factor that disregards CPU requests to some degree and allows me to overcommit the available resources?

1

You should be able to use the flag spec.containers[].resources.limits.cpu to set your desired state on a deployment.

The official docs here and here have some examples of how to specify this in the yaml. You can set a global default along with min/max limits:

spec:
  limits:
  - default:
      cpu: 1000m
    defaultRequest:
      cpu: 300m
  - min:
      cpu: 300m
  - max:
      cpu: 1000m
| improve this answer | |
  • Unfortunately, this does not at all answer my question. Might be a misunderstanding. – Johannes Dec 27 '19 at 17:57
  • @Johannes: What is your question then? The above shows how you can set a default CPU request above the minimum (i.e. over-committing). – Wesley Rolnick Dec 27 '19 at 18:05

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.