Namespaces & Resource Isolation
Namespaces provide a mechanism for isolating groups of resources within a single Kubernetes cluster.
1. Default Namespaces
Section titled “1. Default Namespaces”default: The fallback namespace for objects created without an explicit namespace.kube-system: Houses internal control plane and cluster add-on workloads (CoreDNS, kube-proxy, CNI).kube-public: Readable by all users; stores public cluster information such as cluster CA certificates.kube-node-lease: Holds heartbeat lease objects for each node to determine cluster health.
2. Managing Namespaces
Section titled “2. Managing Namespaces”# Create a namespace declaratively or imperativelykubectl create namespace production
# List all namespaceskubectl get namespaces
# Set default namespace for current kubectl contextkubectl config set-context --current --namespace=production