# List Namespaces
kubectl get ns
# Craete Namespace
kubectl create namespace <namespace-name>
kubectl create namespace dev1
kubectl create namespace dev2
# List Namespaces
kubectl get ns
Deploy All k8s Objects to default, dev1 and dev2 namespaces¶
# Deploy All k8s Objects
kubectl apply -f kube-manifests/
kubectl apply -f kube-manifests/ -n dev1
kubectl apply -f kube-manifests/ -n dev2
# List all objects from default, dev1 & dev2 Namespaces
kubectl get all -n default
kubectl get all -n dev1
kubectl get all -n dev2
# Delete namespaces dev1 & dev2
kubectl delete ns dev1
kubectl delete ns dev2
# List all objects from dev1 & dev2 Namespaces
kubectl get all -n dev1
kubectl get all -n dev2
# List Namespaces
kubectl get ns
# Delete App from default Namespace (Dont Delete default Namespace - k8s default service exists in it)
kubectl delete -f kube-manifests/
# Get all from All Namespaces
kubectl get all -all-namespaces