[Yandex Cloud documentation](../../../index.md) > [Yandex Cloud Stackland](../../index.md) > [Step-by-step guides](../index.md) > [Projects](index.md) > Creating a project quota

# Creating a quota

After creating a [project](create-project.md), the administrator can limit resources using the `ResourceQuota` [object](https://kubernetes.io/docs/concepts/policy/resource-quotas/).

## Using the CLI

1. Create a file of the `ResourceQuota` resource, e.g., using the `touch resourcequota.yaml` command.
1. Open the file and paste the configuration below into it:

      {% list tabs %}

      - Quota without scope

          ```yaml
          apiVersion: v1
          kind: ResourceQuota
          metadata:
            name: example-quota
          spec:
            hard:
              requests.cpu: '2' # Requested CPUs: 2
              limits.cpu: '4'    # CPU limit: 4
              requests.memory: '1' # Requested RAM: 1 GB
              limits.memory: '10'   # RAM limit: 10 GB
              requests.nvidia.com/gpu: 1 # Requested GPUs: 1
          ```

      - Quota with scope

          {% note info %}

          The quota will only be applied to pods with the `priorityClassName: middle` property.

          {% endnote %}

          ```yaml
          apiVersion: v1
          kind: ResourceQuota
          metadata:
            name: priority-class-quota
          spec:
            hard:
              limits.cpu: '10' # CPU limit: 10
              limits.memory: '20' # RAM limit: 20 GB
              requests.cpu: '5' # Requested CPU: 5
              requests.memory: '10' # Requested RAM: 10 GB
            scopeSelector:
              matchExpressions:
                - scopeName: PriorityClass
                  operator: In
                  values:
                    - middle
          ```

      {% endlist %}

1. Apply the manifest: `kubectl apply -f resourcequota.yaml -n <project name>`. Optionally, you can specify the project name in the `metadata.namespace` resource property and skip it in the command.

## Using the management console

1. If you have not opened a project yet, select one.
1. Go to the **Quotas** tab on the project description page.
1. Click **Add quota**.
1. Enter a name for the quota.
1. Specify values for the `limits.cpu` and `requests.cpu` fields or select other resources.
1. To apply the quota to the entire project, delete the text from the **Scope** field. Otherwise, the quota will only be applied to pods with the `priorityClassName: middle` property. Optionally, instead of deleting the text, you can change the scope to what is required to apply the quota.
1. Click **Save**.