--all-namespaces shorthand

As a beginner to kubectl, I must have typed (and re-typed due to typos) --all-namespaces many hundreds of times before I stumbled across the -A shorthand notation for this.  I sincerely would be grateful on behalf of all kubectl beginners if this very useful cheat could be added to this cheatsheet.  I have proposed in this PR a location quite near the beginning of the cheatsheet for this so that it is very hard to miss.
This commit is contained in:
Brett Wolmarans 2022-03-02 09:21:06 -08:00 committed by GitHub
parent 2cb30790dd
commit 8dd6fa677d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -38,6 +38,11 @@ complete -F __start_kubectl k
source <(kubectl completion zsh) # setup autocomplete in zsh into the current shell
echo "[[ $commands[kubectl] ]] && source <(kubectl completion zsh)" >> ~/.zshrc # add autocomplete permanently to your zsh shell
```
### A Note on --all-namespaces
Appending --all-namespaces happens frequently enough where you should be aware of the shorthand for --all-namespaces:
```kubectl -A```
## Kubectl context and configuration