A. Resource limits
Resource limits allow you to set boundaries (max/min & default) for the compute resources a developer can define on pod/container level (see https://docs.openshift.com/enterprise/3.1/dev_guide/compute_resources.html).
- Login to OpenShift with an admin user
- Change to target project with
oc project <my-project>
- Import limit range (see https://docs.openshift.com/enterprise/3.1/dev_guide/limits.html on what options are available)
oc create -f limit-range.json
- Browse to OpenShift admin console, select the project and then “Settings”.
B. Quotas
A quota allows you to set hard limits on the overall resource consumption on project level. This is in particular useful to create a t-shirt size based accounting model (small, medium, large) for OpenShift. See also https://docs.openshift.com/enterprise/3.1/dev_guide/quota.html.
- Login to OpenShift with an admin user
- Change to target project with
oc project <my-project>
- Create quota for project:
oc create -f resource-quota.json
- Browse to OpenShift admin console, select the project and then “Settings”.
The source code can be found on my Github page: https://github.com/sebastianfaulhaber/openshift-v3-showcase/tree/master/openshift-resources