To quote the Zen of Python:
Namespaces are one honking great idea -- let's do more of those!
Namespaces are a way to isolate cluster resources into groups. They're a bit like directories on your computer, but instead of containing files, they contain Kubernetes objects. As you've already learned, every resource in Kubernetes has a name. Some of our names include:
You can only use a name once. It is a unique identifier. That's how kubectl apply
knows when it should create a new resource and when it should update an existing one. Namespaces allow us to use the same name for different resources, as long as they're in different namespaces.
Run the following command:
kubectl get namespaces
or the shorter version:
kubectl get ns
How many namespaces are in your cluster?