Namespaces can divide resources within the same cluster into different workspaces, allowing you to perform resource isolation, quota management, permission management, business accounting, and other operations. This helps reduce the cost of managing and maintaining ACK clusters in a multi-tenant scenario.
Prerequisites
An ACK cluster is created. For more information, see Create an ACK managed cluster.
Introduction to Namespaces
In an ACK cluster, you can use namespaces to create multiple virtual spaces. If multiple users share a cluster, creating multiple namespaces can effectively divide workspaces, allocate cluster resources for various purposes, and partition and manage resources for each namespace through resource quotas.
For example, pods that are in the running state can use unlimited CPU and memory resources on a node by default, which means that pods in one namespace may exhaust the resources of that cluster. In this case, you can configure multiple resource quotas for the namespace, including CPU, memory, and the number of pods.
Create a Namespace
Log on to the ACK console. In the left-side navigation pane, click Clusters.
On the Clusters page, find the cluster that you want to manage and click its name. In the left-side navigation pane, click Namespaces and Quotas.
Click Create, configure the namespace name and label in the dialog box that appears, and then click OK.
After creating the namespace, you can edit its configuration (such as modifying labels), set resource quotas and limits, delete the namespace, and perform other operations.
Configure Resource Quotas and Limits
After creating a namespace, you can configure the corresponding resource quotas and default resource limits to control the resource usage and overhead of pods in the namespace.
On the Namespace page, click Resource Quotas and Limits in the Actions column of the target namespace.
In the Resource Quotas and Limits dialog box, configure the resource quotas and default resource limits.
For more information about how to complete the configuration, see the Kubernetes official documentation Resource Quotas and Configure Default Memory Requests and Limits for a Namespace.
NoteAfter setting CPU and memory quotas for a namespace, you must specify CPU and memory limits when creating pods, or configure default resource limits for the namespace.
References
For information about cluster quotas and limits, such as product and cluster configuration limits, single cluster capacity limits, cluster quotas, and underlying cloud product quotas, see Quotas and Limits.
You can combine Resource Access Management (RAM) users or RAM roles with Role-Based Access Control (RBAC) permissions to achieve granular access management for clusters or namespaces, see Grant RAM Permissions to RAM Users or RAM Roles and Grant RBAC Permissions to RAM Users or RAM Roles.