summaryrefslogtreecommitdiff
path: root/plugins/kubectl
diff options
context:
space:
mode:
authorFiras Bouzguenda <19820205+mofibo@users.noreply.github.com>2025-11-22 18:31:03 +0100
committerGitHub <noreply@github.com>2025-11-22 18:31:03 +0100
commitb04e01d41822963875db876e1d3e7e7d1b67541c (patch)
tree7a53b4500fa15abc1a4f4d802a7887bb49970c58 /plugins/kubectl
parent15bcada010887a519f70f8612c5750b396d49b9d (diff)
downloadzsh-b04e01d41822963875db876e1d3e7e7d1b67541c.tar.gz
zsh-b04e01d41822963875db876e1d3e7e7d1b67541c.tar.bz2
zsh-b04e01d41822963875db876e1d3e7e7d1b67541c.zip
feat(kubectl): add aliases for `kubectl rollout restart` (#12883)
Co-authored-by: Marc Cornellà <marc@mcornella.com>
Diffstat (limited to 'plugins/kubectl')
-rw-r--r--plugins/kubectl/README.md4
-rw-r--r--plugins/kubectl/kubectl.plugin.zsh2
2 files changed, 5 insertions, 1 deletions
diff --git a/plugins/kubectl/README.md b/plugins/kubectl/README.md
index 6f347a8ee..e510c5f40 100644
--- a/plugins/kubectl/README.md
+++ b/plugins/kubectl/README.md
@@ -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 |
diff --git a/plugins/kubectl/kubectl.plugin.zsh b/plugins/kubectl/kubectl.plugin.zsh
index 4a72c02af..912136da4 100644
--- a/plugins/kubectl/kubectl.plugin.zsh
+++ b/plugins/kubectl/kubectl.plugin.zsh
@@ -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"