In Kubernetes, several default namespaces exist. What is the main role of the kube-system namespace?
Think about where Kubernetes keeps its own essential services.
The kube-system namespace holds the core Kubernetes components like the scheduler, controller manager, and DNS services. It is not meant for user workloads.
What is the output of the command kubectl get namespaces immediately after installing a new Kubernetes cluster?
kubectl get namespacesRemember the default namespaces Kubernetes creates for system and node management.
A fresh Kubernetes cluster typically has four default namespaces: default, kube-system, kube-public, and kube-node-lease.
If you create a pod using kubectl apply -f pod.yaml and the pod manifest does not specify a namespace, where will the pod be created?
Think about Kubernetes' default behavior when no namespace is given.
When no namespace is specified, Kubernetes places resources in the default namespace automatically.
You have a pod in the default namespace trying to access a service named dns-service in the kube-system namespace using just dns-service as the hostname. Why does this fail?
Think about how Kubernetes DNS resolves service names across namespaces.
To access a service in another namespace, you must use the full DNS name: service-name.namespace.svc.cluster.local. Using just the service name only works within the same namespace.
You manage a Kubernetes cluster shared by multiple teams. What is the best practice regarding namespaces to isolate team workloads?
Think about how namespaces help with resource isolation and access control.
Namespaces provide a natural boundary for resource isolation, quota management, and access control, making them ideal for separating teams in a shared cluster.