If you have a Quota in place in the project, is it required that Resource Limits or Requests are in place for Pods in the project in order for new pods to be created?
I am looking at some OReilly training that indicates as such, but don't see this information in the Red Hat training.
Hello @emsecrist !
The official Kubernetes documentation mentions this : https://kubernetes.io/docs/concepts/policy/resource-quotas/#:~:text=If%20you%20enforce%20a%20resourc....
Even if you do not explicitly specify how much memory or CPU a Pod can use, the Quota will still limit the total amount of resources that can be used by all Pods in the project. If the Quota is reached, new Pods will not be able to be created, even if they do not specify any Resource Limits or Requests.
Setting Resource Limits and Requests for Pods can give you more control over how much memory and CPU each Pod can use. This can help to ensure that your Pods do not use too many resources and that they do not get evicted from the cluster.
This is also a worth reading reference which is in sync with official K8 documentation : https://docs.openshift.com/container-platform/4.12/applications/quotas/quotas-setting-per-project.ht...
In summary : Best Practice : If a resource quota applies to a resource request, then the pod should define a resource request. If a resource quota applies to a resource limit, then the pod should also define a resource limit. Even without quotas, you should define resource requests and limits.
Hello @emsecrist !
The official Kubernetes documentation mentions this : https://kubernetes.io/docs/concepts/policy/resource-quotas/#:~:text=If%20you%20enforce%20a%20resourc....
Even if you do not explicitly specify how much memory or CPU a Pod can use, the Quota will still limit the total amount of resources that can be used by all Pods in the project. If the Quota is reached, new Pods will not be able to be created, even if they do not specify any Resource Limits or Requests.
Setting Resource Limits and Requests for Pods can give you more control over how much memory and CPU each Pod can use. This can help to ensure that your Pods do not use too many resources and that they do not get evicted from the cluster.
This is also a worth reading reference which is in sync with official K8 documentation : https://docs.openshift.com/container-platform/4.12/applications/quotas/quotas-setting-per-project.ht...
In summary : Best Practice : If a resource quota applies to a resource request, then the pod should define a resource request. If a resource quota applies to a resource limit, then the pod should also define a resource limit. Even without quotas, you should define resource requests and limits.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.