Home > front end >  Kubernetes Resource Requests and Limits
Kubernetes Resource Requests and Limits

Time:12-09

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

CodePudding user response:

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/

  • Related