create namespace kubernetes yaml code example
Example 1: k8s create namespace
# cli
kubectl create ns test-namespace
# or in yaml
---
apiVersion: v1
kind: Namespace
metadata:
name: test-namespace
Example 2: kubectl create namespace
# Create Namespace in current cluster
kubectl create namespace my-namespace
Example 3: kubernetes get namespace
# Get Namespaces for current cluster
kubectl get namespaces