When importing a namespace, if the namespace contains multiple ResourceQuota resources, the platform will select the smallest value for each quota item among all ResourceQuotas and merge them, ultimately creating a single ResourceQuota named default
.
Example:
The namespace to-import
to be imported contains the following resourcequota
resources:
After importing the to-import
namespace, the following default
ResourceQuota will be created in that namespace:
For each ResourceQuota, the quotas of resources is the minimum value between a
and b
.
When multiple ResourceQuotas exist in a namespace, Kubernetes validates each ResourceQuota independently. Therefore, after importing a namespace, it is recommended to delete all ResourceQuotas except for the default
one. This helps avoid complications in quota calculations due to multiple ResourceQuotas, which can easily lead to errors.
default
in a namespace when importing it?When importing a namespace, if the namespace contains multiple LimitRange resources, the platform cannot merge them into a single LimitRange. Since Kubernetes independently validates each LimitRange when multiple exist, and the behavior of which LimitRange's default values Kubernetes selects is unpredictable.
The platform will create a LimitRange named default
when creating a namespace. Therefore, before importing a namespace, only a single LimitRange named default
should exist in the namespace.