diff options
author | Ulrich Schreiner <ulrich.schreiner@gmail.com> | 2019-03-10 17:36:51 +0100 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2019-03-10 09:36:51 -0700 |
commit | 275e5b13498e04173f703538bff32fc2c801b4d3 (patch) | |
tree | ef778b6e57e88a31c577d4f6c279cf7cb9d22f23 /plugins | |
parent | e3e0dd599ea4ed3e4d89ed4cadbe049a25013700 (diff) | |
download | zsh-275e5b13498e04173f703538bff32fc2c801b4d3.tar.gz zsh-275e5b13498e04173f703538bff32fc2c801b4d3.tar.bz2 zsh-275e5b13498e04173f703538bff32fc2c801b4d3.zip |
allow kubectl commands against all namespaces (#7637)
* allow kubectl commands against all namespaces
* enhance the readme too
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/kubectl/README.md | 1 | ||||
-rw-r--r-- | plugins/kubectl/kubectl.plugin.zsh | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/plugins/kubectl/README.md b/plugins/kubectl/README.md index b30f90548..3343f0195 100644 --- a/plugins/kubectl/README.md +++ b/plugins/kubectl/README.md @@ -14,6 +14,7 @@ plugins=(... kubectl) | Alias | Command | Description | |:--------|:------------------------------------|:-------------------------------------------------------------------------------------------------| | k | `kubectl` | The kubectl command | +| kca | `kubectl --all-namespaces` | The kubectl command targeting all namespaces | | kaf | `kubectl apply -f` | Apply a YML file | | keti | `kubectl exec -ti` | Drop into an interactive terminal on a container | | | | **Manage configuration quickly to switch contexts between local, dev and staging** | diff --git a/plugins/kubectl/kubectl.plugin.zsh b/plugins/kubectl/kubectl.plugin.zsh index d388d6543..ab7a1a0a4 100644 --- a/plugins/kubectl/kubectl.plugin.zsh +++ b/plugins/kubectl/kubectl.plugin.zsh @@ -13,6 +13,9 @@ fi # This command is used a LOT both below and in daily life alias k=kubectl +# Execute a kubectl command against all namespaces +alias kca='f(){ kubectl "$@" --all-namespaces; unset -f f; }; f' + # Apply a YML file alias kaf='kubectl apply -f' |