Namespaces:
Create new namespace:
let us assume we have shared k8s cluster for dev and production use cases
the dev team would like to maintain a space in the cluster where they can get a view on the list of pods, services and deployments they use to build and run their application. In this, no restrictions are put on who can or cannot modify resources to enable agile development
for prod team we can enforce strict procedure on who can or cannot manipulate the set of pods, services and deployments
cmd - kubectl get namespaces
# NAMESPACES
apiVersion: v1
kind: Namespace
metadata:
name: dev
labels:
name: dev
dev pod
kubectl get pods
o/p: no resources default namespace
kubectl get pods -n dev