> For the complete documentation index, see [llms.txt](https://notebook.iuriioapps.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notebook.iuriioapps.com/containers-and-microservices/kubernetes/kubectl-namespaces-and-context.md).

# Kubectl Namespaces and Context

* Namespaces limit scope, aka 'virtual clusters'
* Not related to Docker / Linux namespaces
* Won't need them in small clusters
* There are some built-in, to hide system stuff from kubectl users
  * `kubectl get namespaces`
  * `kubectl get all --all-namespaces`
* Context changes kubectl cluster and namespace, see `~/.kube/config` file
  * `kubectl config get-contexts`
  * `kubectl config set*` <-- see help for this
