# Kubernetes Namespaces Guide Kubernetes **namespaces** allow you to organize and isolate resources within your cluster. --- ## ๐Ÿงพ Listing Namespaces To list all namespaces: ```bash kubectl get namespaces ``` or the shorthand: ```bash kubectl get ns ``` --- ## ๐Ÿ› ๏ธ Creating a Namespace Create a new namespace: ```bash kubectl create namespace ``` or: ```bash kubectl create ns ``` --- ## ๐Ÿ—‘๏ธ Deleting a Namespace Delete a namespace: ```bash kubectl delete ns ``` --- ## โš ๏ธ Best Practices & Notes * **Namespaces are isolated**, but they **can still communicate** with each other by default. * It is **not recommended to create namespaces that start with `kube-`**, as those are typically reserved for system components. --- ## ๐Ÿ“„ Creating a Namespace with a Manifest You can define a namespace using a YAML manifest: ```yaml apiVersion: v1 kind: Namespace metadata: name: namespace-test ``` Apply it using: ```bash kubectl apply -f namespace.yaml ```