You can create namespaces as workspaces to complete different tasks. This topic describes
how to create, modify, and delete namespaces in a Kubernetes cluster.
Background information
In a Kubernetes cluster, you can use namespaces to create multiple virtual clusters.
If multiple users share a cluster, you can create namespaces as workspaces to complete
different tasks and use resource quotas to allocate resources in the namespaces.
Create a namespace
- Log on to the ACK console.
- In the left-side navigation pane of the ACK console, click Clusters.
- On the Clusters page, find the cluster that you want to manage and click the name of the cluster
or click Details in the Actions column. The details page of the cluster appears.
- In the left-side navigation pane, click Namespaces and Quotas.
- On the page that appears, click Create in the upper-right corner.
- In the Create Namespace dialog box, set the parameters. Then, click OK.
Return to the Namespace page. In the list of namespaces, you can view that the namespace
named test is created.
Edit a namespace
- Log on to the ACK console.
- In the left-side navigation pane of the ACK console, click Clusters.
- On the Clusters page, find the cluster that you want to manage and click the name of the cluster
or click Details in the Actions column. The details page of the cluster appears.
- In the left-side navigation pane, click Namespaces and Quotas.
- On the Namespace page, find the namespace that you want to modify and click Edit in the Actions column.
- In the dialog box that appears, click Edit to modify the label of the namespace. For example, modify the key-value pair of the
label to
env:test-V2
. Click Save. Then, click OK.
Delete a namespace
- Log on to the ACK console.
- In the left-side navigation pane of the ACK console, click Clusters.
- On the Clusters page, find the cluster that you want to manage and click the name of the cluster
or click Details in the Actions column. The details page of the cluster appears.
- In the left-side navigation pane, click Namespaces and Quotas.
- Find the namespace that you want to delete and click Delete in the Actions column.
- In the Note message, click Confirm.
Return to the Namespace page. You can find that the namespace is deleted. Resource
objects in the namespace are also deleted.