Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zimfw/k
All kubectl aliases in one function.
https://github.com/zimfw/k
kubectl zim zimfw zsh zsh-plugin zsh-plugins
Last synced: 6 days ago
JSON representation
All kubectl aliases in one function.
- Host: GitHub
- URL: https://github.com/zimfw/k
- Owner: zimfw
- License: mit
- Created: 2022-10-20T02:45:03.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-01T13:26:23.000Z (4 months ago)
- Last Synced: 2024-12-10T10:09:55.269Z (2 months ago)
- Topics: kubectl, zim, zimfw, zsh, zsh-plugin, zsh-plugins
- Language: Shell
- Homepage:
- Size: 12.7 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
k
=All kubectl aliases in one function. Also initializes kubectl completion if it
was not initialized.```
usage: k [args...]
```The keys parameter is composed of:
* 1 command key
* 0 or more resource keys
* 0 or more option keys
* 0 or 1 suffix keyall typed sequentially without spaces. Longer keys have precedence over shorter
keys. E.g `pvc` has precedence over `pv`.### Commands
| Key | Command |
| --- | ------- |
| a | apply |
| c | create |
| d | describe |
| e | edit |
| E | exec |
| g | get |
| h | help |
| k | kustomize |
| l | logs |
| t | top |
| v | version |
| x | delete |### Resources
| Key | Resource |
| --- | -------- |
| apis | apiservice |
| bi | binding |
| cj | cronjob |
| cm | configmap |
| cr | clusterrole |
| crb | clusterrolebinding |
| crd | customresourcedefinition |
| crv | controllerrevision |
| cs | componentstatus |
| csid | csidriver |
| csin | csinode |
| csisc | csistoragecapacity |
| csr | certificatesigningrequest |
| de | deployment |
| ds | daemonset |
| ep | endpoint |
| eps | endpointslice |
| ev | event |
| fs | flowschema |
| hpa | horizontalpodautoscaler |
| ic | ingressclass |
| ing | ingress |
| jo | job |
| le | lease |
| lr | limitrange |
| lsarv | localsubjectaccessreview |
| mwc | mutatingwebhookconfiguration |
| no | node |
| np | networkpolicy |
| ns | namespace |
| pc | priorityclass |
| pdb | poddisruptionbudget |
| plc | prioritylevelconfiguration |
| po | pod |
| psp | podsecuritypolicies |
| pt | podtemplate |
| pv | persistentvolume |
| pvc | persistentvolumeclaim |
| rb | rolebinding |
| rc | replicationcontroller |
| ro | role |
| rq | resourcequota |
| rs | replicaset |
| rtc | runtimeclass |
| sa | serviceaccount |
| sarv | subjectaccessreview |
| sc | storageclass |
| sec | secret |
| ssarv | selfsubjectaccessreview |
| ssrrv | selfsubjectrulesreview |
| sts | statefulset |
| svc | service |
| tr | tokenrequest |
| trv | tokenreview |
| va | volumeattachment |
| vo | volume |
| vwc | validatingwebhookconfiguration |### Options
| Key | Option |
| --- | ------ |
| A | --all-namespaces |
| a | --all |
| h | --help |
| oj | -o=json |
| on | -o=name |
| ow | -o=wide |
| oy | -o=yaml |
| sl | --show-labels |
| w | --watch |### Suffixes
| Key | Suffix |
| --- | ------ |
| f | -f |
| k | -k |
| l | -l |Examples
--------
| Input | Output |
| ----- | ------ |
| `k af pod.json` | `kubectl apply -f pod.json` |
| `k dpol name=myLabel` | `kubectl describe pod -l name=myLabel` |
| `k gk dir/` | `kubectl get -k dir/` |
| `k gpoowA` | `kubectl get pod -o=wide --all-namespaces` |
| `k gsvcrc` | `kubectl get service,replicationcontroller` |
| `k xpoa` | `kubectl delete pod --all` |