Namespaces

In Kubernetes, namespaces provide a mechanism for isolating groups of resources within a single cluster. Names of resources need to be unique within a namespace, but not across namespaces. Namespace-based scoping is applicable only for namespaced objects (e.g. Deployments, Services, etc.) and not for cluster-wide objects (e.g. StorageClass, Nodes, PersistentVolumes, etc.).

Default Namespaces

Creates four default namespaces

  • default

  • kube-node-lease

  • kube-public

  • kube-system

to manage cluster resources

kubectl get ns 
NAME              STATUS   AGE
default           Active   30m
kube-node-lease   Active   30m
kube-public       Active   30m
kube-system       Active   30m

Create a namespace

kubectl create namespace testing

Output:

Namespace YAML Template

Last updated