Unverified Commit 8260005d authored by Joaquín Moreira's avatar Joaquín Moreira Committed by GitHub
Browse files

kubectl: add alias to list pods by namespace (#8604)

parent 93e9b80d
...@@ -33,7 +33,8 @@ plugins=(... kubectl) ...@@ -33,7 +33,8 @@ plugins=(... kubectl)
| kep | `kubectl edit pods` | Edit pods from the default editor | | kep | `kubectl edit pods` | Edit pods from the default editor |
| kdp | `kubectl describe pods` | Describe all pods | | kdp | `kubectl describe pods` | Describe all pods |
| kdelp | `kubectl delete pods` | Delete all pods matching passed arguments | | kdelp | `kubectl delete pods` | Delete all pods matching passed arguments |
| kgpl | `kgp -l` | Get pod by label. Example: `kgpl "app=myapp" -n myns` | | kgpl | `kgp -l` | Get pods by label. Example: `kgpl "app=myapp" -n myns` |
| kgpn | `kgp -n` | Get pods by namespace. Example: `kgpn kube-system` |
| | | **Service management** | | | | **Service management** |
| kgs | `kubectl get svc` | List all services in ps output format | | kgs | `kubectl get svc` | List all services in ps output format |
| kgsw | `kgs --watch` | After listing all services, watch for changes | | kgsw | `kgs --watch` | After listing all services, watch for changes |
......
...@@ -47,6 +47,9 @@ alias kdelp='kubectl delete pods' ...@@ -47,6 +47,9 @@ alias kdelp='kubectl delete pods'
# get pod by label: kgpl "app=myapp" -n myns # get pod by label: kgpl "app=myapp" -n myns
alias kgpl='kgp -l' alias kgpl='kgp -l'
# get pod by namespace: kgpn kube-system"
alias kgpn='kgp -n'
# Service management. # Service management.
alias kgs='kubectl get svc' alias kgs='kubectl get svc'
alias kgsa='kubectl get svc --all-namespaces' alias kgsa='kubectl get svc --all-namespaces'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment