In a standard Kubernetes deployment, resource quotas are applied to individual namespaces. However, you cannot apply the quota to your namespaces simultaneously with a single action. Instead, the resource quota must be applied multiple times.
In the following diagram, a Kubernetes administrator is trying to enforce a resource quota without Rancher. The administrator wants to apply a resource quota that sets the same CPU and memory limit to every namespace in his cluster () . However, in the base version of Kubernetes, each namespace requires a unique resource quota. The administrator has to create four different resource quotas that have the same specs configured (Resource Quota 1-4
) and apply them individually.
Base Kubernetes: Unique Resource Quotas Being Applied to Each Namespace
The resource quota includes two limits, which you set while creating or editing a project:
-
This value is the default resource limit available for each namespace. When the resource quota is created at the project level, this limit is automatically propagated to each namespace in the project. Each namespace is bound to this default limit unless you override it.
In the following diagram, a Rancher administrator wants to apply a resource quota that sets the same CPU and memory limit for every namespace in their project (). However, in Rancher, the administrator can set a resource quota for the project (Project Resource Quota
) rather than individual namespaces. This quota includes resource limits for both the entire project () and individual namespaces (Namespace Default Limit
). Rancher then propagates the quotas to each namespace (Namespace Resource Quota
) when created.
Rancher: Resource Quotas Propagating to Each Namespace
The following table explains the key differences between the two quota types.