Kubernetes: Namespaces

Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called namespaces.

More info here: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

 

List namespaces: 

kubectl get namespaces

but handy to see labels attached so run:

kubectl get namespaces --show-labels

https://kubernetes.io/docs/tasks/administer-cluster/namespaces-walkthrough/

Problems:

error: the server doesn’t have a resource type “namespaces”

Check what context you’re using. E.g. kubectx and then check if that cluster is running. E.g. minikube status.

 

 

More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

 

Practical examples: Deploy a WordPress app using Kubernetes on AWS

See also Kubernetes: creating a new namespace and using it in a new context

Leave a Reply

Your email address will not be published. Required fields are marked *