Namespaces
Namespaces are a way to separate groups of resources within a single Kubernetes cluster. The names of resources must be different within a namespace, but they can be the same between namespaces.
When many teams or projects share a Kubernetes cluster, namespaces provide a means to divide clusters into virtual sub-clusters.
A cluster can support any number of namespaces, each of which can interact with the others despite being logically isolated from the others. A namespace cannot be nested inside of another namespace.
Any resource in Kubernetes may be found in either the default namespace or a namespace that the cluster operator defines.
Benefits of Namespaces
Allowing teams or projects to existing in their own virtual clusters.
Role-based access controls (RBAC)
Simple method for separating containerized application
Resource quotas
Default Namespaces in K8s
Default
The namespace for objects that have no other namespace.
Kube-System
The namespace for Kubernetes-created objects.
Kube-Public
This namespace is generated automatically and can be accessed by all users (including those not authenticated). This namespace is mostly reserved for cluster use, in case some resources need to be publicly visible and readable across the entire cluster. This namespace public aspect is merely a convention, not a requirement.
Kube-Node-Lease
This namespace is generated automatically and can be accessed by all users (including those not authenticated). This namespace is mostly reserved for cluster use, in case some resources need to be publicly visible and readable across the entire cluster. This namespace’s public aspect is merely a convention, not a requirement.
Sample Namespace File
Last updated