d4c939d61ebd204599240a60d7473bbc241fb5b7

Author
Eric Semeniuc <3838856+esemeniuc@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

feat(kubectl): add aliases for replicasets (#10100)

Diff

 1diff --git a/plugins/kubectl/README.md b/plugins/kubectl/README.md
 2index f777884829bb9ea1eb7b67912114d1049716b37b..579a90b3b8f10a442281ba090320ed448d85e921 100644
 3--- a/plugins/kubectl/README.md
 4+++ b/plugins/kubectl/README.md
 5@@ -22,7 +22,7 @@ plugins=(... kubectl)
 6 | kcsc    | `kubectl config set-context`        | Set a context entry in kubeconfig                                                                |
 7 | kcdc    | `kubectl config delete-context`     | Delete the specified context from the kubeconfig                                                 |
 8 | kccc    | `kubectl config current-context`    | Display the current-context                                                                      |
 9-| kcgc    | `kubectl config get-contexts`       | List of contexts available
10+| kcgc    | `kubectl config get-contexts`       | List of contexts available                                                                       |
11 |         |                                     | **General aliases**                                                                              |
12 | kdel    | `kubectl delete`                    | Delete resources by filenames, stdin, resources and names, or by resources and label selector    |
13 | kdelf   | `kubectl delete -f`                 | Delete a pod using the type and name specified in -f argument                                    |
14@@ -71,9 +71,11 @@ plugins=(... kubectl)
15 | kdeld   | `kubectl delete deployment`         | Delete the deployment                                                                            |
16 | ksd     | `kubectl scale deployment`          | Scale a deployment                                                                               |
17 | krsd    | `kubectl rollout status deployment` | Check the rollout status of a deployment                                                         |
18-| kres    | `kubectl set env $@ REFRESHED_AT=...` | Recreate all pods in deployment with zero-downtime                                                         |
19+| kres    | `kubectl set env $@ REFRESHED_AT=...` | Recreate all pods in deployment with zero-downtime                                             |
20 |         |                                     | **Rollout management**                                                                           |
21-| kgrs    | `kubectl get rs`                    | To see the ReplicaSet `rs` created by the deployment                                             |
22+| kgrs    | `kubectl get replicaset`            | List all ReplicaSets `rs` created by the deployment                                              |
23+| kdrs    | `kubectl describe replicaset`       | Describe ReplicaSet in detail                                                                    |
24+| kers    | `kubectl edit replicaset`           | Edit ReplicaSet from the default editor                                                          |
25 | krh     | `kubectl rollout history`           | Check the revisions of this deployment                                                           |
26 | kru     | `kubectl rollout undo`              | Rollback to the previous revision                                                                |
27 |         |                                     | **Port forwarding**                                                                              |
28diff --git a/plugins/kubectl/kubectl.plugin.zsh b/plugins/kubectl/kubectl.plugin.zsh
29index 3e87c2395ddf4ac226bdde685979324a69e5e21a..0ee252ac3cbf65556d5a30383d39463d1503300a 100644
30--- a/plugins/kubectl/kubectl.plugin.zsh
31+++ b/plugins/kubectl/kubectl.plugin.zsh
32@@ -112,7 +112,9 @@ function kres(){
33 }
34 
35 # Rollout management.
36-alias kgrs='kubectl get rs'
37+alias kgrs='kubectl get replicaset'
38+alias kdrs='kubectl describe replicaset'
39+alias kers='kubectl edit replicaset'
40 alias krh='kubectl rollout history'
41 alias kru='kubectl rollout undo'
42