Virtual cluster quotas
Virtual clusters support optional resource quotas that apply at the namespace level of the host cluster.
Virtual clusters support optional resource quotas. Quotas apply at the namespace level of the host (parent) cluster. When you turn quotas on, Cloudera Cloud Factory applies Kubernetes ResourceQuota and LimitRange objects to the namespace to constrain the workloads. When you create a virtual cluster, you can turn quotas on or off, choose the Small, Medium, or Large profile, or set every field in Custom mode.
The following table describes the quota concepts.
| Concept | Description |
|---|---|
| CPU | Measured in cores. 1 is one full core, 500m is half a core, and 100m is 10 percent of a core. |
| CPU request | The minimum CPU reserved for a container. |
| CPU limit | The maximum CPU that a container can use. A container that exceeds the limit is throttled. |
| RAM | Measured in mebibytes and gibibytes. 128Mi is 128 mebibytes, and 1Gi is 1 gibibyte. |
| RAM request | The memory reserved for a container. |
| RAM limit | The maximum memory that a container can use. A container that exceeds the limit is terminated with an out-of-memory (OOM) error. |
| Ephemeral storage | Temporary disk space for logs, caches, and temporary files. It is deleted when the container is removed. A Pod that exceeds its ephemeral storage is terminated with the Evicted status. |
The following table describes the quota fields and how they map to Kubernetes.
| Field | Description | Kubernetes mapping |
|---|---|---|
| Max Cluster CPU Requests (core) | The maximum total of the CPU requests of all containers. | ResourceQuota.spec.hard["requests.cpu"] |
| Max Cluster CPU Limits (core) | The maximum total of the CPU limits of all containers. | ResourceQuota.spec.hard["limits.cpu"] |
| Default Container CPU Request (m) | The request for containers that do not specify one. | LimitRange.spec.limits[].defaultRequest.cpu |
| Default Container CPU Limit (m) | The limit for containers that do not specify one. | LimitRange.spec.limits[].default.cpu |
| Max Cluster RAM Requests (Gi) | The maximum total of the memory requests of all containers. | ResourceQuota.spec.hard["requests.memory"] |
| Max Cluster RAM Limits (Gi) | The maximum total of the memory limits of all containers. | ResourceQuota.spec.hard["limits.memory"] |
| Default Container RAM Request (Mi) | The request for containers that do not specify one. | LimitRange.spec.limits[].defaultRequest.memory |
| Default Container RAM Limit (Mi) | The limit for containers that do not specify one. | LimitRange.spec.limits[].default.memory |
| Max Cluster Ephemeral Storage Requests (Gi) | The maximum total of the ephemeral storage requests. | ResourceQuota.spec.hard["requests.ephemeral-storage"] |
| Max Cluster Ephemeral Storage Limits (Gi) | The maximum total of the ephemeral storage limits. | ResourceQuota.spec.hard["limits.ephemeral-storage"] |
| Default Container Ephemeral Storage Request (Mi) | The request for containers that do not specify one. | LimitRange.spec.limits[].defaultRequest.ephemeral-storage |
| Default Container Ephemeral Storage Limit (Gi) | The limit for containers that do not specify one. | LimitRange.spec.limits[].default.ephemeral-storage |
| Max Pods | The maximum total number of Pods. | ResourceQuota.spec.hard.pods |
| Max PVCs | The maximum number of PersistentVolumeClaims (PVCs). | ResourceQuota.spec.hard.persistentvolumeclaims |
| Max Total PVC Size (Gi) | The maximum total storage, in gibibytes, that all PVCs can request together. | ResourceQuota.spec.hard["requests.storage"] |
| Max Ingresses | The maximum number of Ingresses. | ResourceQuota.spec.hard["count/ingresses.networking.k8s.io"] |
| Max LoadBalancers | The maximum number of Services of type LoadBalancer. | ResourceQuota.spec.hard.services.loadbalancers |
The predefined profiles set the following values.
| Resource | Setting | Small (default) | Medium | Large |
|---|---|---|---|---|
| CPU | Request | 4 | 12 | 24 |
| CPU | Limit | 8 | 24 | 48 |
| CPU | Default request | 100m | 200m | 200m |
| CPU | Default limit | 1000m | 500m | 500m |
| RAM | Request | 8Gi | 24Gi | 48Gi |
| RAM | Limit | 16Gi | 48Gi | 96Gi |
| RAM | Default request | 128Mi | 128Mi | 128Mi |
| RAM | Default limit | 512Mi | 512Mi | 512Mi |
| Ephemeral storage | Request | 10Gi | 15Gi | 30Gi |
| Ephemeral storage | Limit | 20Gi | 30Gi | 60Gi |
| Ephemeral storage | Default request | 20Mi | 20Mi | 20Mi |
| Ephemeral storage | Default limit | 2Gi | 2Gi | 2Gi |
| Pods | Limit | 50 | 150 | 300 |
| PVCs | Limit | 10 | 20 | 40 |
| PVC size | Limit | 100Gi | 250Gi | 500Gi |
| Ingresses | Limit | 10 | 50 | 200 |
| LoadBalancers | Limit | 4 | 20 | 100 |
If you turn on quotas when you create a virtual cluster, you can change them later as long as the parent cluster is healthy. The new values must follow the same rules. For example, limits must be greater than or equal to requests.
