Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to explicitly remove cpu limits for a container?

I want to remove cpu limits for a specific container where the namespace has default cpu limits (via limitrange). Per docs the default value will be assigned. When I explicitly set limits.cpu to 0, I got an error that tells me requests value 20m should be less than or equal to limits value.

So is it possible to force no limits in that case?

like image 277
Yasser Rabee Avatar asked Aug 31 '25 04:08

Yasser Rabee


2 Answers

Seems like you can remove limits with null value. At least it worked from helmfile:

   resources:
    requests:
      memory: "100Mi"
      cpu: "100m"
    limits:
      memory: "100Mi"
      cpu: null
like image 111
Konstantin Avatar answered Sep 02 '25 23:09

Konstantin


After more research, it is not possible to achieve. It does make sense to me it is not possible as stated by Frank Gu: because that would pretty much defeat the purpose of resource quotas in the first place

like image 22
Yasser Rabee Avatar answered Sep 02 '25 22:09

Yasser Rabee