Managing Namespace Quotas
By default, pods running in a CCE cluster can use the CPUs and memory of a node without restrictions. This means that pods in a namespace may exhaust all resources of the cluster.
Kubernetes provides namespaces for you to group workloads in a cluster. By setting resource quotas for each namespace, you can prevent resource exhaustion and ensure cluster reliability. You can configure quotas for resources such as CPU, memory, and the number of pods in a namespace. For more information, see Resource Quotas.
Prerequisites
- A CCE cluster has been bound to the environment. For details, see Binding a CCE Cluster.
- The CCE cluster bound to the environment has a user-created namespace or the cluster-created namespace default.
Managing Namespace Resource Quotas
- Log in to ServiceStage.
- Choose Environment Management. The Environment Management page is displayed.
- Click the target environment. The Overview page is displayed.
- Choose Cloud Container Engine from Compute.
- Go to the Namespace page.
- For an HA environment, click the cluster that has been bound in the environment and click the Namespace tab.
- For a non-HA environment, click the Namespace tab.
- Click Resource Quota Manager in the Operation column of the target namespace.
In the displayed Resource Quota Manager dialog box, view the resource types, total resource quotas, and accumulated quota usage in the namespace.Figure 1 Accessing the Resource Quota Manager page
- Click Edit Quota and set the total quota of each resource type.
- If the usage of a resource type is not limited, leave it blank.
- If the usage of a resource type is limited, enter an expected integer ranging from 1 to 9,007,199,254,740,992.
- Accumulated quota usage includes the default resources created by CCE, such as the Kubernetes service (which can be viewed using kubectl) created under the default namespace. Therefore, you are advised to set a resource quota slightly greater than expected.
- If the total CPU or memory quota in a namespace is limited, you must set the maximum and minimum number of CPU cores and memory (GiB) that can be used by the component when setting resources for the Kubernetes component of this namespace in Creating and Deploying a Component and Upgrading a Single Component. Otherwise, the operation will fail.
- If the total quota of other resource types in a namespace is limited and the remaining usage of this resource type does not meet requirements, the Kubernetes component of this namespace will fail to be deployed.
- Click OK.
On the Resource Quota Manager page, view the total resource quota and accumulated quota usage of the resource type whose quota has been reset.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot