Kubernetes initial namespaces¶
Kubernetes clusters create four initial namespaces upon initialization to serve specific system and administrative functions.^[400-devops-06-kubernetes-k8s-ithelp-day22-readme.md]
Default Namespaces¶
The following four namespaces are established by default:
- default: This is the default namespace assigned to any object or request that does not explicitly specify a namespace.^[400-devops-06-kubernetes-k8s-ithelp-day22-readme.md]
- kube-system: This namespace is reserved for objects created by the Kubernetes system itself.^[400-devops-06-kubernetes-k8s-ithelp-day22-readme.md]
- kube-public: This namespace is automatically created and is readable by all users, including those who are unauthenticated.^[400-devops-06-kubernetes-k8s-ithelp-day22-readme.md] While typically used for resources that should be visible cluster-wide, its status as a "public" namespace is primarily a convention rather than a hard security requirement.^[400-devops-06-kubernetes-k8s-ithelp-day22-readme.md]
- kube-node-lease: This namespace contains Lease objects associated with each node.^[400-devops-06-kubernetes-k8s-ithelp-day22-readme.md] These leases allow the kubelet to send heartbeats, enabling the control plane to detect node failures.^[400-devops-06-kubernetes-k8s-ithelp-day22-readme.md]
Operational Context¶
These initial namespaces are fundamental to the cluster's operation and resource isolation. Namespaces allow a single physical Kubernetes cluster to be divided into multiple "virtual clusters" for different teams or projects.^[400-devops-06-kubernetes-k8s-ithelp-day22-readme.md]
While users generally interact with the default namespace or create new ones for isolation, interfering with the system namespaces is typically discouraged. Kubernetes attempts to restart critical system services if they are deleted, but manual intervention in these spaces can lead to cluster instability.^[400-devops-06-kubernetes-k8s-ithelp-day22-readme.md]
Related Concepts¶
- Kubernetes Namespaces
- [[Resource Quota]]
- Kubernetes Control Plane
Sources¶
^[400-devops-06-kubernetes-k8s-ithelp-day22-readme.md]