# Resource Quotas

> Source: https://parallelworks.com/docs/kubernetes/resource-quotas

# Resource Quotas

Resource quotas let you set limits on CPU, memory, and GPU usage per namespace across your Kubernetes clusters. Use quotas to prevent any single namespace from consuming more than its fair share of cluster resources.

## What Quotas Control

Each quota is scoped to a specific namespace on a specific cluster and enforces limits on three resource types:

| Resource | Unit | Description |
|----------|------|-------------|
| **CPU** | Millicores (e.g., `1000m` = 1 core) | Maximum CPU that workloads in the namespace can consume |
| **Memory** | Mebibytes (e.g., `1Gi`, `512Mi`) | Maximum memory that workloads in the namespace can consume |
| **GPU** | Count (e.g., `1`) | Maximum number of NVIDIA GPUs that workloads in the namespace can request |

Kubernetes enforces these limits at the scheduling level. Pods that would exceed the quota are rejected until resources are freed.

## Creating a Quota

1. Navigate to **Kubernetes > Quotas** and click **Add Quota** in the action bar.
2. Fill in the quota form:

| Field | Required | Description |
|-------|----------|-------------|
| **Cluster Name** | Yes | The target Kubernetes cluster |
| **Namespace** | Yes | The namespace to apply the quota to |
| **CPU** | Yes | CPU limit (e.g., `1000m` for 1 core, `500m` for half a core) |
| **Memory** | Yes | Memory limit (e.g., `1Gi`, `2048Mi`) |
| **GPU** | Yes | GPU limit (integer, e.g., `0` for no GPUs, `2` for two GPUs) |

3. Click **Create Quota**.

:::info Managed by Platform
Quotas are created as Kubernetes `ResourceQuota` objects in the target namespace. The platform manages these objects for you -- you do not need to write YAML manifests.
:::

## Viewing Quota Utilization

The **Kubernetes > Quotas** page displays a table of all quotas across your clusters. Each quota row shows the current usage relative to the configured limit for CPU, memory, and GPU.

Usage is displayed as a progress bar with the format **used / limit**:

| Utilization | Color | Meaning |
|-------------|-------|---------|
| 0 -- 50% | Green | Healthy usage, plenty of headroom |
| 50 -- 70% | Yellow | Moderate usage, consider monitoring |
| Above 70% | Red | High usage, namespace is approaching its limit |

Use the cluster and namespace filters at the top of the page to narrow the view.

:::tip High Utilization
If a quota's CPU or memory bar is consistently red, consider increasing the limit or moving workloads to a less utilized namespace.
:::

## Editing a Quota

1. On the **Quotas** page, select a single quota by clicking its checkbox.
2. Click **Edit** in the action bar.
3. Update the CPU, memory, or GPU limits in the form.
4. Click **Update Quota**.

:::warning Existing Workloads
Lowering a quota below current usage does not terminate running workloads, but it prevents new pods from being scheduled until usage drops below the new limit.
:::

## Deleting Quotas

1. On the **Quotas** page, select one or more quotas by clicking their checkboxes.
2. Click **Delete** in the action bar.
3. Confirm the deletion in the dialog.

Deleting a quota removes the `ResourceQuota` object from the namespace. Workloads in the namespace are no longer subject to the deleted limits.
