feat(kubectl): add kcgetns alias to show the current namespace (#13215)

* rebase and review changes

* full command in readme

* space
This commit is contained in:
Jans Rautenbach authored and GitHub committed 2026-11-27 18:33:03 -08:00
1 parent 71679f351d
commit 4ec1d17074
2 files changed
+3 -1

No files matched your search

+1
View File
@@ -60,6 +60,7 @@ plugins=(... kubectl)
| | | **Namespace management** |
| kgns | `kubectl get namespaces` | List the current namespaces in a cluster |
| kcn | `kubectl config set-context --current --namespace` | Change current namespace |
| kcgetns | `kubectl config view --minify -o jsonpath={.contexts[0].context.namespace}` | Get the current context's namespace |
| kens | `kubectl edit namespace` | Edit namespace resource from the default editor |
| kdns | `kubectl describe namespace` | Describe namespace resource in detail |
| kdelns | `kubectl delete namespace` | Delete the namespace. WARNING! This deletes everything in the namespace |