How To Create Kubernetes NameSpaces

  • There are two ways to build kubernetes NameSpaces. They are

1. Imperative way
2. Declarative way

Step 1: Imperative Way Of Creating Namespaces

  • You can use the following command to create the name sspace using the imperative command:
kubectl create namespace <nameSpaceName>

  • Replace “<nameSpaceName>” with your own name.
 Note: For the name, use small letters

Method 2: Using Declarative Manifest File

  • The declarative Manifest file can be used to create the namspace using the following YAML.
apiVersion: v1
kind: Namespace
metadata:
name: <Give Your name>
labels:
team: gfgtesting

How To Delete Namespace In Kubernetes?

Kubernetes container orchestration tool that helps in managing the containerized application in pods and provides additional features such as security, storage, and network. Kubernetes comes with a service known as a namespace that helps in working and managing of resources. In this article we are going to discuss on how to delete the namespaces in Kuberenetes.

Similar Reads

What Is Kubernetes NameSpace?

Within a Kubernetes cluster, a Namespace can be compared to a virtual cluster. In a single Kubernetes cluster, there can be several namespaces that are conceptually segregated from one another. They can support you and your groups in terms of performance, security, and organization....

How To List All The NameSpaces In Kubernetes

Use the below-specified command to get a list of all the namespaces that are available in Kubernetes....

How To Create Kubernetes NameSpaces

There are two ways to build kubernetes NameSpaces. They are...

How To Delete Kubernetes NameSpaces

To delete Kubernetes namespaces, you can use the kubectl command-line tool, which is the official Kubernetes command-line client. Here’s the general syntax for deleting a namespace with kubectl delete command:...

Kubernetes Namespace – FAQ’s

What Is The Difference Between Kubernetes Cluster And Namespaces?...

Contact Us