ant
ant

Reputation: 67

Kubernetes Resource Requests and Limits

I'm new to kubernetes. I'm just wondering is there any downside if i'm set the value for kubernetes container resource requests and limits as max as possible like this?

resources:
   limits:
     cpu: '3'
     memory: 1Gi
   requests:
     cpu: '2'
     memory: 256Mi

Upvotes: 2

Views: 1461

Answers (1)

Rafał Leszko
Rafał Leszko

Reputation: 5521

You should set requests to the minimum values your pod needs and limits to the max you allow it to use. It helps Kubernetes to schedule pods properly.

If the requests value is too high, then Kubernetes may not have any node that fulfills these requirements and your pod may not run at all.

Check this link for more details: https://sysdig.com/blog/kubernetes-limits-requests/

Upvotes: 4

Related Questions