feat(kubectl): add generic get and describe aliases (#8851)

Co-authored-by: Mirco Haug <git@mircohaug.de>
Co-authored-by: Robby Russell <robby@planetargon.com>
This commit is contained in:
authored and GitHub committed 2026-12-03 20:34:59 +01:00
1 parent 5b5bf2c51a
commit 0714031cf8
2 files changed
+4

No files matched your search

+2
View File
@@ -31,6 +31,8 @@ plugins=(... kubectl)
| kdelk | `kubectl delete -k` | Delete all resources defined in a kustomization directory | | kdelk | `kubectl delete -k` | Delete all resources defined in a kustomization directory |
| kge | `kubectl get events --sort-by=".lastTimestamp"` | Get events (sorted by timestamp) | | 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) | | kgew | `kubectl get events --watch --sort-by=".lastTimestamp"` | Get events and watch as they occur (sorted by timestamp) |
| kg | `kubectl get` | Get one or more resources |
| kd | `kubectl describe` | Describe one or more resources in detail |
| | | **Pod management** | | | | **Pod management** |
| kgp | `kubectl get pods` | List all pods in ps output format | | kgp | `kubectl get pods` | List all pods in ps output format |
| kgpl | `kgp -l` | Get pods by label. Example: `kgpl "app=myapp" -n myns` | | kgpl | `kgp -l` | Get pods by label. Example: `kgpl "app=myapp" -n myns` |
+2
View File
@@ -47,6 +47,8 @@ alias kdelf='kubectl delete -f'
alias kdelk='kubectl delete -k' alias kdelk='kubectl delete -k'
alias kge='kubectl get events --sort-by=".lastTimestamp"' alias kge='kubectl get events --sort-by=".lastTimestamp"'
alias kgew='kubectl get events --sort-by=".lastTimestamp" --watch' alias kgew='kubectl get events --sort-by=".lastTimestamp" --watch'
alias kg='kubectl get'
alias kd='kubectl describe'
# Pod management. # Pod management.
alias kgp='kubectl get pods' alias kgp='kubectl get pods'