Which statement best explains how Kubernetes namespaces provide isolation?
Think about how namespaces group resources logically inside one cluster.
Namespaces act like separate virtual clusters inside a single Kubernetes cluster. They isolate resources such as pods, services, and config maps by grouping them logically. This prevents name conflicts and limits resource visibility.
You run the command kubectl get pods --all-namespaces. What is the expected output behavior?
kubectl get pods --all-namespacesThink about how namespaces help you see pods grouped by their namespace.
The --all-namespaces flag shows pods from all namespaces, including their namespace names in the output. This helps you see pods isolated by namespace.
You want to deploy two versions of an app in the same cluster but keep them isolated. Which workflow correctly uses namespaces for this?
Namespaces help separate resources logically inside one cluster.
Creating separate namespaces for each app version isolates their pods, services, and configs. This prevents conflicts and allows independent management.
A pod in namespace dev tries to access a service in namespace prod but fails. What is the most likely reason?
Think about default isolation and network policies in Kubernetes.
Kubernetes namespaces isolate resources logically. Network policies can restrict communication between namespaces. Accessing services across namespaces requires explicit DNS or network policy setup.
What is the best practice for using namespaces to manage resource quotas in a Kubernetes cluster?
Think about how namespaces help organize teams and projects.
Applying resource quotas per namespace helps control resource usage for different teams or projects, preventing one from using too many resources and affecting others.