summaryrefslogtreecommitdiff
path: root/plugins/kubectl
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/kubectl')
-rw-r--r--plugins/kubectl/README.md9
-rw-r--r--plugins/kubectl/kubectl.plugin.zsh14
2 files changed, 21 insertions, 2 deletions
diff --git a/plugins/kubectl/README.md b/plugins/kubectl/README.md
index 9cd4a369e..4541c7e92 100644
--- a/plugins/kubectl/README.md
+++ b/plugins/kubectl/README.md
@@ -13,7 +13,7 @@ plugins=(... kubectl)
| Alias | Command | Description |
|:--------|:------------------------------------|:-------------------------------------------------------------------------------------------------|
-| ku | `kubectl` | The kubectl command |
+| k | `kubectl` | The kubectl command |
| kca | `kubectl --all-namespaces` | The kubectl command targeting all namespaces |
| kaf | `kubectl apply -f` | Apply a YML file |
| keti | `kubectl exec -ti` | Drop into an interactive terminal on a container |
@@ -22,6 +22,7 @@ plugins=(... kubectl)
| kcsc | `kubectl config set-context` | Set a context entry in kubeconfig |
| kcdc | `kubectl config delete-context` | Delete the specified context from the kubeconfig |
| kccc | `kubectl config current-context` | Display the current-context |
+| kcgc | `kubectl config get-contexts` | List of contexts available
| | | **General aliases** |
| 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 |
@@ -89,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 |
diff --git a/plugins/kubectl/kubectl.plugin.zsh b/plugins/kubectl/kubectl.plugin.zsh
index 9a4489fb6..5097732db 100644
--- a/plugins/kubectl/kubectl.plugin.zsh
+++ b/plugins/kubectl/kubectl.plugin.zsh
@@ -10,7 +10,8 @@ if (( $+commands[kubectl] )); then
unset __KUBECTL_COMPLETION_FILE
fi
-alias ku=kubectl
+# This command is used a LOT both below and in daily life
+alias k=kubectl
# Execute a kubectl command against all namespaces
alias kca='f(){ kubectl "$@" --all-namespaces; unset -f f; }; f'
@@ -27,6 +28,9 @@ alias kcsc='kubectl config set-context'
alias kcdc='kubectl config delete-context'
alias kccc='kubectl config current-context'
+# List all contexts
+alias kcgc='kubectl config get-contexts'
+
# General aliases
alias kdel='kubectl delete'
alias kdelf='kubectl delete -f'
@@ -111,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'
+