Namespaces

Namespaces – In Kubernetes, namespaces provides a mechanism for isolating groups of resources within a single cluster. Names of resources need to be unique within a namespace, but not across namespaces.

  1. Create a namespace.

kubectl create namespace <namespace_name>
  1. List one or more namespaces.

kubectl get namespace
  1. Display the detailed state of one or more namespaces.

kubectl describe namespace <namespace_name>
  1. Delete a namespace.

kubectl delete namespace <namespace_name>
  1. Edit and update the definition of a namespace.

kubectl edit namespace <namespace_name>
  1. Display Resource (CPU/Memory/Storage) usage for a namespace.

kubectl top namespace <namespace_name>

Last updated