简体   繁体   中英

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

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM