// Module included in the following assemblies:
//
// ../scalability_and_performance/compute-resource-quotas.adoc

:_mod-docs-content-type: PROCEDURE
[id="creating-a-quota_{context}"]
= Creating a quota

[role="_abstract"]
To create a quota, define a `ResourceQuota` object in a file and apply the file to a project. By doing this task, you can restrict aggregate resource consumption and object counts within the project to ensure the project complies with cluster policies.

.Procedure

* To apply resource constraints to a specific project, create a `ResourceQuota` object by using the {oc-first}. Run the following `oc create` command with your definition file to enforce the limits on aggregate resource consumption and object counts specified for that namespace:
+
[source,terminal]
----
$ oc create -f <resource_quota_definition> [-n <project_name>]
----
+
.Example command to create a ResourceQuota object
[source,terminal]
----
$ oc create -f core-object-counts.yaml -n demoproject
----
