mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
feat(kubectl): add aliases for kubectl rollout restart (#12883)
Co-authored-by: Marc Cornellà <marc@mcornella.com>
This commit is contained in:
parent
15bcada010
commit
b04e01d418
2 changed files with 5 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ plugins=(... kubectl)
|
|||
| kdel | `kubectl delete` | Delete resources by filenames, stdin, resources and names, or by resources and label selector |
|
||||
| kdelf | `kubectl delete -f` | Delete a pod using the type and name specified in -f argument |
|
||||
| kge | `kubectl get events --sort-by=".lastTimestamp"` | Get events (sorted by timestamp) |
|
||||
| kgew | `kubectl get events --watch --sort-by=".lastTimestamp"` | Get events and watch as they occur (sorted by timestamp) |
|
||||
| kgew | `kubectl get events --watch --sort-by=".lastTimestamp"` | Get events and watch as they occur (sorted by timestamp) |
|
||||
| | | **Pod management** |
|
||||
| kgp | `kubectl get pods` | List all pods in ps output format |
|
||||
| kgpl | `kgp -l` | Get pods by label. Example: `kgpl "app=myapp" -n myns` |
|
||||
|
|
@ -74,6 +74,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 |
|
||||
| krrd | `kubectl rollout restart deployment` | Rollout restart a deployment |
|
||||
| kres | `kubectl set env $@ REFRESHED_AT=...` | Recreate all pods in deployment with zero-downtime |
|
||||
| | | **Rollout management** |
|
||||
| kgrs | `kubectl get replicaset` | List all ReplicaSets `rs` created by the deployment |
|
||||
|
|
@ -112,6 +113,7 @@ plugins=(... kubectl)
|
|||
| kdelss | `kubectl delete statefulset` | Delete the statefulset |
|
||||
| ksss | `kubectl scale statefulset` | Scale a statefulset |
|
||||
| krsss | `kubectl rollout status statefulset` | Check the rollout status of a deployment |
|
||||
| krrss | `kubectl rollout restart statefulset` | Rollout restart a statefulset |
|
||||
| | | **Service Accounts management** |
|
||||
| kdsa | `kubectl describe sa` | Describe a service account in details |
|
||||
| kdelsa | `kubectl delete sa` | Delete the service account |
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ alias kdd='kubectl describe deployment'
|
|||
alias kdeld='kubectl delete deployment'
|
||||
alias ksd='kubectl scale deployment'
|
||||
alias krsd='kubectl rollout status deployment'
|
||||
alias krrd='kubectl rollout restart deployment'
|
||||
|
||||
function kres(){
|
||||
kubectl set env $@ REFRESHED_AT=$(date +%Y%m%d%H%M%S)
|
||||
|
|
@ -120,6 +121,7 @@ alias kdss='kubectl describe statefulset'
|
|||
alias kdelss='kubectl delete statefulset'
|
||||
alias ksss='kubectl scale statefulset'
|
||||
alias krsss='kubectl rollout status statefulset'
|
||||
alias krrss='kubectl rollout restart statefulset'
|
||||
|
||||
# Port forwarding
|
||||
alias kpf="kubectl port-forward"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue