Add new kubectl alias to list all contexts (#7823)

* Add alias to list all contexts

* Update readme to include new alias
This commit is contained in:
Miral 2019-05-21 23:13:05 +01:00 committed by Robby Russell
parent f62a71e9de
commit 60736c9f37
2 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,7 @@ plugins=(... kubectl)
| kcsc | `kubectl config set-context` | Set a context entry in kubeconfig | | kcsc | `kubectl config set-context` | Set a context entry in kubeconfig |
| kcdc | `kubectl config delete-context` | Delete the specified context from the kubeconfig | | kcdc | `kubectl config delete-context` | Delete the specified context from the kubeconfig |
| kccc | `kubectl config current-context` | Display the current-context | | kccc | `kubectl config current-context` | Display the current-context |
| kcgc | `kubectl config get-contexts` | List of contexts available
| | | **General aliases** | | | | **General aliases** |
| kdel | `kubectl delete` | Delete resources by filenames, stdin, resources and names, or by resources and label selector | | kdel | `kubectl delete` | Delete resources by filenames, stdin, resources and names, or by resources and label selector |
| kdelf | `kubectl delete -f` | Delete a pod using the type and name specified in -f argument | | kdelf | `kubectl delete -f` | Delete a pod using the type and name specified in -f argument |

View File

@ -28,6 +28,9 @@ alias kcsc='kubectl config set-context'
alias kcdc='kubectl config delete-context' alias kcdc='kubectl config delete-context'
alias kccc='kubectl config current-context' alias kccc='kubectl config current-context'
# List all contexts
alias kcgc='kubectl config get-contexts'
# General aliases # General aliases
alias kdel='kubectl delete' alias kdel='kubectl delete'
alias kdelf='kubectl delete -f' alias kdelf='kubectl delete -f'