BeginnerLesson 5 of 35
Namespaces
Virtual clusters inside a cluster.
Namespaces separate teams, environments and apps, and are the scope for names, quotas and RBAC.
bash
kubectl create namespace staging
kubectl get pods -n staging
kubectl get pods -A # all namespaces
kubectl config set-context --current --namespace=stagingDefault namespaces: default, kube-system (cluster components), kube-public, kube-node-lease. Nodes and PersistentVolumes are cluster-scoped, not namespaced.