Refer to the official Kubernetes documentation: Resource Quotas
Used to restrict resources available to a specific namespace. The total resource usage by all Pods in the namespace (excluding those in a Terminating
state) must not exceed the quota.
Resource Requests: Define the minimum resources (e.g., CPU, memory) required by a container, guiding the Kubernetes Scheduler to place the Pod on a node with sufficient capacity.
Resource Limits: Define the maximum resources a container can consume, preventing resource exhaustion and ensuring cluster stability.
If a resource is marked as
Unlimited
, no explicit quota is enforced, but usage cannot exceed the cluster's available capacity.
Resource Quotas track the cumulative resource consumption (e.g., container limits, new Pods, or PVCs) within a namespace.
Supported Quota Types
Field | Description |
---|---|
Resource Requests | Total requested resources for all Pods in the namespace:
|
Resource Limits | Total limit resources for all Pods in the namespace:
|
Number of Pods | Maximum number of Pods allowed in the namespace. |
Note:
Unlimited
implies the namespace can consume the project's remaining cluster resources for that resource type.Create via YAML file
Create via command line directly
Quota Type:
Note: Ensure the storage class is pre-assigned to the project containing the namespace.
Extended resource quotas are defined via ConfigMap. If the ConfigMap is missing, the resource category will not appear.
ConfigMap Field Descriptions
Field | Description |
---|---|
data.dataType | Data type (e.g., vGPU ). |
data.defaultValue | Default value (empty = no default). |
data.descriptionEn | English tooltip text (displayed when hovering over the field). |
data.descriptionZh | Chinese tooltip text (displayed when hovering over the field). |
data.excludeResources | Mutually exclusive resources (comma-separated). |
data.group | Resource group (e.g., MPS ). |
data.groupI18n | Group name in English/Chinese for UI dropdowns. |
data.key | Specifies the value of the key. A configuration dictionary can only describe one key. |
data.labelEn/data.labelZh | The English/Chinese name of the resource, which can be viewed and selected in the drop-down options corresponding to the quota types. This field serves the same function as the data.groupI18n field but is only applicable when the same resource has a single value, ensuring compatibility with the old version of the configuration dictionary (ConfigMap). |
data.limits | Indicates whether to configure limits for the resources. Valid values include: disabled indicates limits cannot be configured for the resource, required indicates it must be input, and optional indicates it is optional input. |
data.requests | Indicates whether to configure requests for the resources. Valid values include: disabled indicates requests cannot be configured for the resource, required indicates it must be input, optional indicates it is optional input, and fromLimits indicates it will use the same configuration as limits. |
data.relatedResources | Associated resources. This field is reserved and currently cannot be used. |
data.resourceUnit | Resource unit (e.g., cores , GiB ). Not support input in Chinese. |
data.runtimeClassName | Runtime class (default: nvidia for GPU). |
metadata.labels | Mandatory labels:
|
metadata.name | The format is cf-crl-<*groupName*>-<*name*> , where
|
metadata.namespace | Must be kube-public |
The format for custom quota names must comply with the following specifications: