Skip to content

Commit 349b9e4

Browse files
authored
docs(kubectl): add missing aliases (ohmyzsh#13699)
1 parent a4ee4da commit 349b9e4

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

plugins/kubectl/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,24 @@ plugins=(... kubectl)
3535
| kgpl | `kgp -l` | Get pods by label. Example: `kgpl "app=myapp" -n myns` |
3636
| kgpn | `kgp -n` | Get pods by namespace. Example: `kgpn kube-system` |
3737
| kgpsl | `kubectl get pods --show-labels` | List all pods in ps output format with labels |
38+
| kgpa | `kubectl get pods --all-namespaces` | List all pods in ps output format across all namespaces |
3839
| kgpw | `kgp --watch` | After listing/getting the requested object, watch for changes |
3940
| kgpwide | `kgp -o wide` | Output in plain-text format with any additional information. For pods, the node name is included |
41+
| kgpall | `kubectl get pods --all-namespaces -o wide` | List all pods across all namespaces in wide output format (including node name) |
4042
| kep | `kubectl edit pods` | Edit pods from the default editor |
4143
| kdp | `kubectl describe pods` | Describe all pods |
4244
| kdelp | `kubectl delete pods` | Delete all pods matching passed arguments |
4345
| | | **Service management** |
4446
| kgs | `kubectl get svc` | List all services in ps output format |
47+
| kgsa | `kubectl get svc --all-namespaces` | List all services across all namespaces |
4548
| kgsw | `kgs --watch` | After listing all services, watch for changes |
4649
| kgswide | `kgs -o wide` | After listing all services, output in plain-text format with any additional information |
4750
| kes | `kubectl edit svc` | Edit services(svc) from the default editor |
4851
| kds | `kubectl describe svc` | Describe all services in detail |
4952
| kdels | `kubectl delete svc` | Delete all services matching passed argument |
5053
| | | **Ingress management** |
5154
| kgi | `kubectl get ingress` | List ingress resources in ps output format |
55+
| kgia | `kubectl get ingress --all-namespaces` | List ingress resources across all namespaces |
5256
| kei | `kubectl edit ingress` | Edit ingress resource from the default editor |
5357
| kdi | `kubectl describe ingress` | Describe ingress resource in detail |
5458
| kdeli | `kubectl delete ingress` | Delete ingress resources matching passed argument |
@@ -60,15 +64,18 @@ plugins=(... kubectl)
6064
| kdelns | `kubectl delete namespace` | Delete the namespace. WARNING! This deletes everything in the namespace |
6165
| | | **ConfigMap management** |
6266
| kgcm | `kubectl get configmaps` | List the configmaps in ps output format |
67+
| kgcma | `kubectl get configmaps --all-namespaces` | List configmaps across all namespaces |
6368
| kecm | `kubectl edit configmap` | Edit configmap resource from the default editor |
6469
| kdcm | `kubectl describe configmap` | Describe configmap resource in detail |
6570
| kdelcm | `kubectl delete configmap` | Delete the configmap |
6671
| | | **Secret management** |
6772
| kgsec | `kubectl get secret` | Get secret for decoding |
73+
| kgseca | `kubectl get secret --all-namespaces` | List secrets across all namespaces |
6874
| kdsec | `kubectl describe secret` | Describe secret resource in detail |
6975
| kdelsec | `kubectl delete secret` | Delete the secret |
7076
| | | **Deployment management** |
7177
| kgd | `kubectl get deployment` | Get the deployment |
78+
| kgda | `kubectl get deployment --all-namespaces` | List deployments across all namespaces |
7279
| kgdw | `kgd --watch` | After getting the deployment, watch for changes |
7380
| kgdwide | `kgd -o wide` | After getting the deployment, output in plain-text format with any additional information |
7481
| ked | `kubectl edit deployment` | Edit deployment resource from the default editor |
@@ -91,7 +98,13 @@ plugins=(... kubectl)
9198
| kgaa | `kubectl get all --all-namespaces` | List the requested object(s) across all namespaces |
9299
| | | **Logs** |
93100
| kl | `kubectl logs` | Print the logs for a container or resource |
101+
| kl1h | `kubectl logs --since 1h` | Print logs from the last hour for a container or resource |
102+
| kl1m | `kubectl logs --since 1m` | Print logs from the last minute for a container or resource |
103+
| kl1s | `kubectl logs --since 1s` | Print logs from the last second for a container or resource |
94104
| klf | `kubectl logs -f` | Stream the logs for a container or resource (follow) |
105+
| klf1h | `kubectl logs --since 1h -f` | Stream logs from the last hour for a container or resource (follow) |
106+
| klf1m | `kubectl logs --since 1m -f` | Stream logs from the last minute for a container or resource (follow) |
107+
| klf1s | `kubectl logs --since 1s -f` | Stream logs from the last second for a container or resource (follow) |
95108
| | | **File copy** |
96109
| kcp | `kubectl cp` | Copy files and directories to and from containers |
97110
| | | **Node management** |
@@ -102,12 +115,14 @@ plugins=(... kubectl)
102115
| kdelno | `kubectl delete node` | Delete the node |
103116
| | | **Persistent Volume Claim management** |
104117
| kgpvc | `kubectl get pvc` | List all PVCs |
118+
| kgpvca | `kubectl get pvc --all-namespaces` | List all PVCs across all namespaces |
105119
| kgpvcw | `kgpvc --watch` | After listing/getting the requested object, watch for changes |
106120
| kepvc | `kubectl edit pvc` | Edit pvcs from the default editor |
107121
| kdpvc | `kubectl describe pvc` | Describe all pvcs |
108122
| kdelpvc | `kubectl delete pvc` | Delete all pvcs matching passed arguments |
109123
| | | **StatefulSets management** |
110124
| kgss | `kubectl get statefulset` | List the statefulsets in ps format |
125+
| kgssa | `kubectl get statefulset --all-namespaces` | List statefulsets across all namespaces |
111126
| kgssw | `kgss --watch` | After getting the list of statefulsets, watch for changes |
112127
| kgsswide | `kgss -o wide` | After getting the statefulsets, output in plain-text format with any additional information |
113128
| kess | `kubectl edit statefulset` | Edit statefulset resource from the default editor |
@@ -121,6 +136,7 @@ plugins=(... kubectl)
121136
| kdelsa | `kubectl delete sa` | Delete the service account |
122137
| | | **DaemonSet management** |
123138
| kgds | `kubectl get daemonset` | List all DaemonSets in ps output format |
139+
| kgdsa | `kubectl get daemonset --all-namespaces` | List all DaemonSets across all namespaces |
124140
| kgdsw | `kgds --watch` | After listing all DaemonSets, watch for changes |
125141
| keds | `kubectl edit daemonset` | Edit DaemonSets from the default editor |
126142
| kdds | `kubectl describe daemonset` | Describe all DaemonSets in detail |

0 commit comments

Comments
 (0)