mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-06-25 12:01:36 +02:00
feat(kubectl): add aliases for get events
(#13147)
This commit is contained in:
parent
6ef47526f8
commit
658240f498
@ -12,7 +12,7 @@ plugins=(... kubectl)
|
||||
## Aliases
|
||||
|
||||
| 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 |
|
||||
@ -26,6 +26,8 @@ plugins=(... kubectl)
|
||||
| | | **General aliases** |
|
||||
| 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 |
|
||||
| kge | `kubectl get events --sort-by=".lastTimestamp"` | Get events (sorted by timestamp) |
|
||||
| kgew | `kubectl get events --watch --sort-by=".lastTimestamp"` | Get events and watch as they occur (sorted by timestamp) |
|
||||
| | | **Pod management** |
|
||||
| kgp | `kubectl get pods` | List all pods in ps output format |
|
||||
| kgpl | `kgp -l` | Get pods by label. Example: `kgpl "app=myapp" -n myns` |
|
||||
|
@ -36,6 +36,8 @@ alias kcgc='kubectl config get-contexts'
|
||||
# General aliases
|
||||
alias kdel='kubectl delete'
|
||||
alias kdelf='kubectl delete -f'
|
||||
alias kge='kubectl get events --sort-by=".lastTimestamp"'
|
||||
alias kgew='kubectl get events --sort-by=".lastTimestamp" --watch'
|
||||
|
||||
# Pod management.
|
||||
alias kgp='kubectl get pods'
|
||||
|
Loading…
x
Reference in New Issue
Block a user