DELAPARRA
Index
Color
NL
Category: Kubernetes

Namespace

Explained by Updated

What is Namespace?

Namespace: A virtual cluster inside a cluster. Groups resources, scopes names, and is the boundary for quotas and RBAC. A Kubernetes namespace is a virtual section of a cluster. Resources in different namespaces can have the same names, and you can apply permissions, resource quotas and network policies per namespace. Common uses are separating environments, such as staging and production, separating applications, or giving each team its own space. Kubernetes itself uses kube-system for its own components.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Namespace

What should you keep in mind with Namespace?

Most kubectl commands work on the current namespace, which makes mistakes easy. Running a delete in production when you thought you were in staging is a classic. Set the namespace explicitly with -n, or use a tool like kubens and a shell prompt that shows the current context and namespace. For strong isolation between untrusted workloads, separate clusters are safer than namespaces alone.

What does an example of Namespace look like?

kubectl create namespace staging kubectl get pods -n staging

At a glance

CategoryKubernetes
Explained by
Updated

More Kubernetes terms

All terms starting with N

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.