浏览代码

Add PersistentVolumeClaim support to kubectl plugin (#7827)

Just add aliases for PVC actions.
Robby Russell 4 年之前
父节点
当前提交
36e13f4803
共有 2 个文件被更改,包括 14 次插入0 次删除
  1. 6 0
      plugins/kubectl/README.md
  2. 8 0
      plugins/kubectl/kubectl.plugin.zsh

+ 6 - 0
plugins/kubectl/README.md

@@ -90,3 +90,9 @@ plugins=(... kubectl)
 | keno    | `kubectl edit node`                 | Edit nodes resource from the default editor                                                      |
 | kdno    | `kubectl describe node`             | Describe node resource in detail                                                                 |
 | kdelno  | `kubectl delete node`               | Delete the node                                                                                  |
+|         |                                   | **Persistent Volume Claim management**                                                           |
+| kgpvc   | `kubectl get pvc`                   | List all PVCs                                                                                    |
+| kgpvcw  | `kgpvc --watch`                     | After listing/getting the requested object, watch for changes                                    |
+| kepvc   | `kubectl edit pvc`                  | Edit pvcs from the default editor                                                                |
+| kdpvc   | `kubectl describe pvc`              | Descirbe all pvcs                                                                                |
+| kdelpvc | `kubectl delete pvc`                | Delete all pvcs matching passed arguments                                                        |

+ 8 - 0
plugins/kubectl/kubectl.plugin.zsh

@@ -115,3 +115,11 @@ alias kgno='kubectl get nodes'
 alias keno='kubectl edit node'
 alias kdno='kubectl describe node'
 alias kdelno='kubectl delete node'
+
+# PVC management.
+alias kgpvc='kubectl get pvc'
+alias kgpvcw='kgpvc --watch'
+alias kepvc='kubectl edit pvc'
+alias kdpvc='kubectl describe pvc'
+alias kdelpvc='kubectl delete pvc'
+