How namespaces impact your resources and services
In this section, we'll learn how to create, update, and delete namespaces, as well as the impacts that namespaces have on services and Pods.
We will also learn how to create resources by specifying a custom namespace so that we don't rely on the default one.
Listing namespaces inside your cluster
We saw this in the previous section but here is how to list the namespaces that have been created in your Kubernetes cluster:
$ kubectl get namespaces
NAME STATUS AGE
default Active 8d
kube-node-lease Active 8d
kube-public Active 8d
kube-system Active 8d
Keep in mind that all the commands that make use of the namespaces
resource Kind
can also use the ns
alias to benefit from a shorter format.
Retrieving the data of a specific namespace
Retrieving the data of a specific namespace can be achieved using the kubectl describe
command as follows.
$ kubectl describe namespaces default
Name...