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
d8c71bbc
Unverified
Commit
d8c71bbc
authored
Jan 07, 2019
by
Yusuf Kocaman
Browse files
added details about kcn and kres
parent
2596aef8
Changes
2
Hide whitespace changes
Inline
Side-by-side
plugins/kubectl/README.md
View file @
d8c71bbc
...
@@ -46,6 +46,7 @@ plugins=(... kubectl)
...
@@ -46,6 +46,7 @@ plugins=(... kubectl)
| kdeli |
`kubectl delete ingress`
| Delete ingress resources matching passed argument |
| kdeli |
`kubectl delete ingress`
| Delete ingress resources matching passed argument |
| | |
**Namespace management**
|
| | |
**Namespace management**
|
| kgns |
`kubectl get namespaces`
| List the current namespaces in a cluster |
| kgns |
`kubectl get namespaces`
| List the current namespaces in a cluster |
| kcn |
`kubectl config set-context ...`
| Change current namespace |
| kens |
`kubectl edit namespace`
| Edit namespace resource from the default editor |
| kens |
`kubectl edit namespace`
| Edit namespace resource from the default editor |
| kdns |
`kubectl describe namespace`
| Describe namespace resource in detail |
| kdns |
`kubectl describe namespace`
| Describe namespace resource in detail |
| kdelns |
`kubectl delete namespace`
| Delete the namespace. WARNING! This deletes everything in the namespace |
| kdelns |
`kubectl delete namespace`
| Delete the namespace. WARNING! This deletes everything in the namespace |
...
@@ -67,6 +68,7 @@ plugins=(... kubectl)
...
@@ -67,6 +68,7 @@ plugins=(... kubectl)
| kdeld |
`kubectl delete deployment`
| Delete the deployment |
| kdeld |
`kubectl delete deployment`
| Delete the deployment |
| ksd |
`kubectl scale deployment`
| Scale a deployment |
| ksd |
`kubectl scale deployment`
| Scale a deployment |
| krsd |
`kubectl rollout status deployment`
| Check the rollout status of a deployment |
| krsd |
`kubectl rollout status deployment`
| Check the rollout status of a deployment |
| kres |
`kubectl set env $@ REFRESHED_AT=...`
| Recreate all pods in deployment with zero-downtime |
| | |
**Rollout management**
|
| | |
**Rollout management**
|
| kgrs |
`kubectl get rs`
| To see the ReplicaSet
`rs`
created by the deployment |
| kgrs |
`kubectl get rs`
| To see the ReplicaSet
`rs`
created by the deployment |
| krh |
`kubectl rollout history`
| Check the revisions of this deployment |
| krh |
`kubectl rollout history`
| Check the revisions of this deployment |
...
...
plugins/kubectl/kubectl.plugin.zsh
View file @
d8c71bbc
...
@@ -59,7 +59,7 @@ alias kgns='kubectl get namespaces'
...
@@ -59,7 +59,7 @@ alias kgns='kubectl get namespaces'
alias
kens
=
'kubectl edit namespace'
alias
kens
=
'kubectl edit namespace'
alias
kdns
=
'kubectl describe namespace'
alias
kdns
=
'kubectl describe namespace'
alias
kdelns
=
'kubectl delete namespace'
alias
kdelns
=
'kubectl delete namespace'
alias
kcn
=
'kubectl config set-context $(kubectl config current-context) --namespace'
#change namespace
alias
kcn
=
'kubectl config set-context $(kubectl config current-context) --namespace'
# ConfigMap management
# ConfigMap management
alias
kgcm
=
'kubectl get configmaps'
alias
kgcm
=
'kubectl get configmaps'
...
@@ -81,7 +81,6 @@ alias kdd='kubectl describe deployment'
...
@@ -81,7 +81,6 @@ alias kdd='kubectl describe deployment'
alias
kdeld
=
'kubectl delete deployment'
alias
kdeld
=
'kubectl delete deployment'
alias
ksd
=
'kubectl scale deployment'
alias
ksd
=
'kubectl scale deployment'
alias
krsd
=
'kubectl rollout status deployment'
alias
krsd
=
'kubectl rollout status deployment'
# Recreate all pods in deployment with zero-downtime
kres
(){
kres
(){
kubectl
set env
$@
REFRESHED_AT
=
$(
date
+%Y%m%d%H%M%S
)
kubectl
set env
$@
REFRESHED_AT
=
$(
date
+%Y%m%d%H%M%S
)
}
}
...
...
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