1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-11 00:10:08 +00:00

Merge pull request #7499 from ykocaman/master

Changing namespace and restarting pods with kubectl
This commit is contained in:
Robby Russell 2019-02-13 11:39:40 -08:00 committed by GitHub
commit e91478eb26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -46,6 +46,7 @@ plugins=(... kubectl)
| kdeli | `kubectl delete ingress` | Delete ingress resources matching passed argument |
| | | **Namespace management** |
| 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 |
| kdns | `kubectl describe namespace` | Describe namespace resource in detail |
| kdelns | `kubectl delete namespace` | Delete the namespace. WARNING! This deletes everything in the namespace |
@ -67,6 +68,7 @@ plugins=(... kubectl)
| kdeld | `kubectl delete deployment` | Delete the deployment |
| ksd | `kubectl scale deployment` | Scale 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** |
| kgrs | `kubectl get rs` | To see the ReplicaSet `rs` created by the deployment |
| krh | `kubectl rollout history` | Check the revisions of this deployment |

View file

@ -59,6 +59,7 @@ alias kgns='kubectl get namespaces'
alias kens='kubectl edit namespace'
alias kdns='kubectl describe namespace'
alias kdelns='kubectl delete namespace'
alias kcn='kubectl config set-context $(kubectl config current-context) --namespace'
# ConfigMap management
alias kgcm='kubectl get configmaps'
@ -80,6 +81,9 @@ alias kdd='kubectl describe deployment'
alias kdeld='kubectl delete deployment'
alias ksd='kubectl scale deployment'
alias krsd='kubectl rollout status deployment'
kres(){
kubectl set env $@ REFRESHED_AT=$(date +%Y%m%d%H%M%S)
}
# Rollout management.
alias kgrs='kubectl get rs'