Applications must be created or deployed under a namespace in your product cluster. Namespaces are required to organize users and their applications.
Required user type or access level: Cluster administrator or team administrator
You can create a namespace by using the OpenShift Container Platform to create a Project. OpenShift Container Platform Projects are recognized as namespaces by IBM Cloud PakĀ® for Multicloud Management. See Creating a Project in the OpenShift documentation for the procedure for creating a Project.
You can also use the kubectl create namespace command to create a namespace by using the Kubernetes CLI. See Installing the Kubernetes CLI (kubectl) for instructions about how to install
the Kubernetes CLI.
Specify the pod security policy to be associated to your namespace. The pod security policy provides security aspects for pods that are created by applications that are installed on the namespace. The default applied pod security policy field displays the policy name that is applied across the cluster for all of the namespaces that are created.
Attention: Multiple pod security policies can be associated with a namespace or ServiceAccount. Pods can resolve to any of the defined polices that are compatible, which might result in a less-restrictive policy. See Policy Order .
After the deployment completes, a new namespace or Project is displayed on the namespaces page.
Note: Be sure to scroll the All namespaces menu to view all of your namespaces.
You can use labels to create network policies that are based on a namespace selector. You cannot add labels for a namespace from the console. To add namespace labels, use the Kubernetes CLI.
Install the kubectl command line interface. See Installing the Kubernetes CLI (kubectl).
View a list of all namespaces.
kubectl get namespaces
The output resembles the following code:
NAME STATUS AGE
default Active 6h
dev Active 2h
kube-system Active 6h
qa Active 2h
Add label.
kubectl label namespaces dev team=dev