Skip to content
thesarfo

Concept

Kubernetes: Namespaces

How namespaces divide a cluster into virtual clusters, and the four defaults Kubernetes ships with.

views 0

Namespaces let you divide a single Kubernetes cluster into smaller, virtual clusters. This is useful when multiple users or teams share the same cluster. Resources inside each namespace must have unique names, but the same names can exist in different namespaces.

You can see all namespaces using:

Terminal window
kubectl get namespaces

Kubernetes includes 4 default namespaces:

  • default, for user-created resources when no namespace is specified
  • kube-system, holds system components (like control plane agents)
  • kube-public, public and readable by anyone (for non-sensitive info)
  • kube-node-lease, tracks node heartbeat data

You can create your own namespaces to organize and isolate users, teams, or applications:

Terminal window
kubectl create namespace my-namespace

Namespaces support multi-tenancy, making Kubernetes ideal for large, shared environments.

To manage resources in namespaces:

  • Use ResourceQuotas to limit total resource usage
  • Use LimitRanges to set limits for individual containers