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.
Contact Us