Categories
OpenShift

OpenShift Quicktip: Limiting resource consumption for users

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).

  1. Login to OpenShift with an admin user
  2. Change to target project with
oc project <my-project>
  1. 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
  1. 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.

  1. Login to OpenShift with an admin user
  2. Change to target project with
oc project <my-project>
  1. Create quota for project:
oc create -f resource-quota.json
  1. 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

By Sebastian Faulhaber

Sebastian has spent over 8 years at IBM working as a technical consultant focusing on Business Integration and Business Process Management (BPM).
In 2013 Sebastian joined Red Hat as a Solution Architect; In this role, he used his extensive field experience to support customers with their digital transformation using open source & cloud technology. In 2019 Sebastian took over the leadership for a team of IT architects dealing with middleware, container technology and cloud at Red Hat Germany.

Leave a Reply

Your email address will not be published. Required fields are marked *

close

Subscribe to our newsletter.

Please select all the ways you would like to hear from Open Sourcerers:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our newsletter platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.