Skip to content

Commit

Permalink
allow kubectl commands against all namespaces (#7637)
Browse files Browse the repository at this point in the history
* allow kubectl commands against all namespaces

* enhance the readme too
  • Loading branch information
ulrichSchreiner authored and robbyrussell committed Mar 10, 2019
1 parent e3e0dd5 commit 275e5b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions plugins/kubectl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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** |
Expand Down
3 changes: 3 additions & 0 deletions plugins/kubectl/kubectl.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit 275e5b1

Please sign in to comment.