O! be some other namespace: What's in a namespace?

A Kubernetes namespace provides isolation between Kubernetes objects. This can help different projects, teams, or customers share a Kubernetes cluster. Read more about namespaces in the Kubernetes docs.

Here's a little visualization exercise of the isolation namespaces provide.

Let's take an example where DNS is configured with a Kubernetes cluster. In this instance, a service name acts as a hostname. Services within namespaces are accessible at <ServiceName>.<NamespaceName>. When you connect to <ServiceName>.<NamespaceName> you're doing a DNS lookup, similar to when you connect to google.com.


If a pod in Namespace1 calls ServiceA in the same namespace, Kubernetes will default to that namespace. No need to specify the namespace: