Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
8260005d
Unverified
Commit
8260005d
authored
Jul 14, 2020
by
Joaquín Moreira
Committed by
GitHub
Jul 14, 2020
Browse files
kubectl: add alias to list pods by namespace (#8604)
parent
93e9b80d
Changes
2
Hide whitespace changes
Inline
Side-by-side
plugins/kubectl/README.md
View file @
8260005d
...
...
@@ -33,7 +33,8 @@ plugins=(... kubectl)
| kep |
`kubectl edit pods`
| Edit pods from the default editor |
| kdp |
`kubectl describe pods`
| Describe all pods |
| 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**
|
| kgs |
`kubectl get svc`
| List all services in ps output format |
| kgsw |
`kgs --watch`
| After listing all services, watch for changes |
...
...
plugins/kubectl/kubectl.plugin.zsh
View file @
8260005d
...
...
@@ -47,6 +47,9 @@ alias kdelp='kubectl delete pods'
# get pod by label: kgpl "app=myapp" -n myns
alias
kgpl
=
'kgp -l'
# get pod by namespace: kgpn kube-system"
alias
kgpn
=
'kgp -n'
# Service management.
alias
kgs
=
'kubectl get svc'
alias
kgsa
=
'kubectl get svc --all-namespaces'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment