Creating a namespace in a Kubernetes cluster
Written by
Updated at January 26, 2026
To create a namespace in a Managed Service for Kubernetes cluster:
Management console
kubectl CLI
-
Open Managed Service for Kubernetes in the folder where you want to update the Kubernetes cluster.
-
Select the cluster from the list.
-
Navigate to the Namespaces tab.
-
In the top-right corner, click Create.
-
Specify a Name for the namespace. It must comply with RFC 1123
:- It may be up to 63 characters long.
- It may contain only lowercase Latin letters, numbers, and hyphens.
- Use a letter or number for the first and last characters.
Note
We do not recommend using the
kube-prefix since it is reserved for system namespaces. -
Click Add.
Install kubect
Run this command:
kubectl create namespace <namespace_name>
The namespace name must comply with RFC 1123
- It may be up to 63 characters long.
- It may contain only lowercase Latin letters, numbers, and hyphens.
- Use a letter or number for the first and last characters.
Note
We do not recommend using the kube- prefix since it is reserved for system namespaces.