From fdcb54068cc989e94c7d63ec123d8ed7e29a7766 Mon Sep 17 00:00:00 2001 From: Jeremy Delgado Date: Mon, 2 Sep 2024 12:41:38 +0200 Subject: [PATCH] change: reintroduce old kgpl and add kgpsl --- plugins/kubectl/README.md | 3 ++- plugins/kubectl/kubectl.plugin.zsh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/kubectl/README.md b/plugins/kubectl/README.md index 8d689a72d..169b96c34 100644 --- a/plugins/kubectl/README.md +++ b/plugins/kubectl/README.md @@ -28,7 +28,8 @@ plugins=(... kubectl) | kdelf | `kubectl delete -f` | Delete a pod using the type and name specified in -f argument | | | | **Pod management** | | kgp | `kubectl get pods` | List all pods in ps output format | -| kgpl | `kubectl get pods --show-labels` | List all pods in ps output format with labels | +| kgpl | `kgp -l` | Get pods by label. Example: `kgpl "app=myapp" -n myns` | +| kgpsl | `kubectl get pods --show-labels` | List all pods in ps output format with labels | | kgpw | `kgp --watch` | After listing/getting the requested object, watch for changes | | kgpwide | `kgp -o wide` | Output in plain-text format with any additional information. For pods, the node name is included | | kep | `kubectl edit pods` | Edit pods from the default editor | diff --git a/plugins/kubectl/kubectl.plugin.zsh b/plugins/kubectl/kubectl.plugin.zsh index 2558f19e4..2f1b5c1cf 100644 --- a/plugins/kubectl/kubectl.plugin.zsh +++ b/plugins/kubectl/kubectl.plugin.zsh @@ -39,9 +39,10 @@ alias kdelf='kubectl delete -f' # Pod management. alias kgp='kubectl get pods' -alias kgpl='kubectl get pods --show-labels' +alias kgpsl='kubectl get pods --show-labels' alias kgpa='kubectl get pods --all-namespaces' alias kgpw='kgp --watch' +alias kgpl='kgp -l' alias kgpwide='kgp -o wide' alias kep='kubectl edit pods' alias kdp='kubectl describe pods'