Skip to content

joke/zim-kubectl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zim-kubectl

zim module for kubectl.

Features

  • Completion
  • Aliases

Settings

You can customize the default prefix by adding a zstyle to your ~/.zshrc before this module is initialized.

zstyle ':zim:kubectl' aliases-prefix 'K'

Aliases

Search for aliases

You can search for aliases by using

k? <snippet>

Be aware that k is mapped to your selected prefix.

Example:

k? get pod
kghpa    kubectl get horizontalpodautoscaler
kghpal   kubectl get horizontalpodautoscaler -l
kghpaw   kubectl get horizontalpodautoscaler -o wide
kghpawa  kubectl get horizontalpodautoscaler --watch
kghpay   kubectl get horizontalpodautoscaler -o yaml
kgpo     kubectl get pod
kgpol    kubectl get pod -l
kgpow    kubectl get pod -o wide
kgpowa   kubectl get pod --watch
kgpoy    kubectl get pod -o yaml
kgpdb    kubectl get poddisruptionbudget
kgpdbl   kubectl get poddisruptionbudget -l
kgpdbw   kubectl get poddisruptionbudget -o wide
kgpdbwa  kubectl get poddisruptionbudget --watch
kgpdby   kubectl get poddisruptionbudget -o yaml

Command specific aliases (e.g. get, edit)

Command Group Alias Command
k kubectl`
get kg kubectl get
kgf kubectl get -f
kgk kubectl get -k
kgl kubectl get -l
kgw kubectl get -o wide
kgwa kubectl get --watch
kgy kubectl get -o yaml
edit ke kubectl edit
kef kubectl edit -f
kek kubectl edit -k
kel kubectl edit -l
delete kdel kubectl delete
kdelf kubectl delete -f
kdelk kubectl delete -k
kdell kubectl delete -l
describe kd kubectl describe
kdk kubectl describe -k
kdl kubectl describe -f
kdl kubectl describe -l
config kccc kubectl config current-context
kcdc kubectl config delete-context
kcgc kubectl config get-contexts
kcsc kubectl config set-context
kcscn kubectl config set-context --current --namespace
kcuc kubectl config use-context
label kla kubectl label
klal kubectl label -l
annotate kan kubectl annotate
kanl kubectl annotate -l
apply kaf kubectl apply -f
kak kubectl apply -k
logs kl kubectl logs
kl1h kubectl logs --since 1h
kl1m kubectl logs --since 1m
kl1s kubectl logs --since 1s
klf kubectl logs -f
klf1h kubectl logs --since 1h -f
klf1m kubectl logs --since 1m -f
klf1s kubectl logs --since 1s -f
exec keti kubectl exec -t -i
port-forward kpf kubectl port-forward
top ktno kubectl top node
ktnol kubectl top node -l
ktpo kubectl top pod
ktpol kubectl top pod -l
all: a kda kubectl describe all
kga kubectl get all
kgal kubectl get all -l
kgaw kubectl get all -o wide
kgawa kubectl get all --watch
kgay kubectl get all -o yaml
kea kubectl edit all
keal kubectl edit all -l
kdela kubectl delete all

Resource specific aliases (get pod, edit pod)

Resource specific aliases are generated based on these abbreviations:

Abbreviation kubernetes resource
a all
cj cronjob
cm configmap
cr clusterrole
crb clusterrolebinding
dep deployment
deploy deployment
hpa horizontalpodautoscaler
ing ingress
j job
no node
ns namespace
pc priorityclass
pdb poddisruptionbudget
po pod
pv persistentvolume
pvc persistentvolumeclaim
rc replicationcontroller
rs replicaset
sa serviceaccount
sec secret
sts statefulset
svc service
Resource Group Alias Command
clusterrole: cr kdcr kubectl describe clusterrole
kgcr kubectl get clusterrole
kgcrl kubectl get clusterrole -l
kgcrw kubectl get clusterrole -o wide
kgcrwa kubectl get clusterrole --watch
kgcry kubectl get clusterrole -o yaml
kecr kubectl edit clusterrole
kecrl kubectl edit clusterrole -l
kdelcr kubectl delete clusterrole
clusterrolebinding: crb kdcrb kubectl describe clusterrole
kgcrb kubectl get clusterrole
kgcrbl kubectl get clusterrole -l
kgcrbw kubectl get clusterrole -o wide
kgcrbwa kubectl get clusterrole --watch
kgcrby kubectl get clusterrole -o yaml
kecrb kubectl edit clusterrole
kecrbl kubectl edit clusterrole -l
kdelcrb kubectl delete clusterrole
configmap: cm kdcm kubectl describe configmap
kgcm kubectl get configmap
kgcml kubectl get configmap -l
kgcmw kubectl get configmap -o wide
kgcmwa kubectl get configmap --watch
kgcmy kubectl get configmap -o yaml
kecm kubectl edit configmap
kecml kubectl edit configmap -l
kdelcm kubectl delete configmap
cronjob: cj kdcj kubectl describe cronjob
kgcj kubectl get cronjob
kgcjl kubectl get cronjob -l
kgcjw kubectl get cronjob -o wide
kgcjwa kubectl get cronjob --watch
kgcjy kubectl get cronjob -o yaml
kecj kubectl edit cronjob
kecjl kubectl edit cronjob -l
kdelcj kubectl delete cronjob
daemonset: ds kdds kubectl describe daemonset
kgds kubectl get daemonset
kgdsl kubectl get daemonset -l
kgdsw kubectl get daemonset -o wide
kgdswa kubectl get daemonset --watch
kgdsy kubectl get daemonset -o yaml
keds kubectl edit daemonset
kedsl kubectl edit daemonset -l
kdelds kubectl delete daemonset
deployment: dep kddep kubectl describe deployment
kgdep kubectl get deployment
kgdepl kubectl get deployment -l
kgdepw kubectl get deployment -o wide
kgdepwa kubectl get deployment --watch
kgdepy kubectl get deployment -o yaml
kedep kubectl edit deployment
kedepl kubectl edit deployment -l
kdeldep kubectl delete deployment
deployment: deploy kddeploy kubectl describe deployment
kgdeploy kubectl get deployment
kgdeployl kubectl get deployment -l
kgdeployw kubectl get deployment -o wide
kgdeploywa kubectl get deployment --watch
kgdeployy kubectl get deployment -o yaml
kedeploy kubectl edit deployment
kedeployl kubectl edit deployment -l
kdeldeploy kubectl delete deployment
horizontalpodautoscaler: hpa kdhpa kubectl describe horizontalpodautoscaler
kghpa kubectl get horizontalpodautoscaler
kghpal kubectl get horizontalpodautoscaler -l
kghpaw kubectl get horizontalpodautoscaler -o wide
kghpawa kubectl get horizontalpodautoscaler --watch
kghpay kubectl get horizontalpodautoscaler -o yaml
kehpa kubectl edit horizontalpodautoscaler
kehpal kubectl edit horizontalpodautoscaler -l
kdelhpa kubectl delete horizontalpodautoscaler
ingress: ing kding kubectl describe ingress
kging kubectl get ingress
kgingl kubectl get ingress -l
kgingw kubectl get ingress -o wide
kgingwa kubectl get ingress --watch
kgingy kubectl get ingress -o yaml
keing kubectl edit ingress
keingl kubectl edit ingress -l
kdeling kubectl delete ingress
job: j kdj kubectl describe job
kgj kubectl get job
kgjl kubectl get job -l
kgjw kubectl get job -o wide
kgjwa kubectl get job --watch
kgjy kubectl get job -o yaml
kej kubectl edit job
kejl kubectl edit job -l
kdelj kubectl delete job
namespace: ns kdns kubectl describe namespace
kgns kubectl get namespace
kgnsl kubectl get namespace -l
kgnsw kubectl get namespace -o wide
kgnswa kubectl get namespace --watch
kgnsy kubectl get namespace -o yaml
kens kubectl edit namespace
kensl kubectl edit namespace -l
kdelns kubectl delete namespace
node: no kdno kubectl describe node
kgno kubectl get node
kgnol kubectl get node -l
kgnow kubectl get node -o wide
kgnowa kubectl get node --watch
kgnoy kubectl get node -o yaml
keno kubectl edit node
kenol kubectl edit node -l
kdelno kubectl delete node
persistentvolume: pv kdpv kubectl describe persistentvolume
kgpv kubectl get persistentvolume
kgpvl kubectl get persistentvolume -l
kgpvw kubectl get persistentvolume -o wide
kgpvwa kubectl get persistentvolume --watch
kgpvy kubectl get persistentvolume -o yaml
kepv kubectl edit persistentvolume
kepvl kubectl edit persistentvolume -l
kdelpv kubectl delete persistentvolume
persistentvolumeclaim: pvc kdpvc kubectl describe persistentvolumeclaim
kgpvc kubectl get persistentvolumeclaim
kgpvcl kubectl get persistentvolumeclaim -l
kgpvcw kubectl get persistentvolumeclaim -o wide
kgpvcwa kubectl get persistentvolumeclaim --watch
kgpvcy kubectl get persistentvolumeclaim -o yaml
kepvc kubectl edit persistentvolumeclaim
kepvcl kubectl edit persistentvolumeclaim -l
kdelpvc kubectl delete persistentvolumeclaim
pod: po kdpo kubectl describe pod
kgpo kubectl get pod
kgpol kubectl get pod -l
kgpow kubectl get pod -o wide
kgpowa kubectl get pod --watch
kgpoy kubectl get pod -o yaml
kepo kubectl edit pod
kepol kubectl edit pod -l
kdelpo kubectl delete pod
poddisruptionbudget: pdb kdpdb kubectl describe poddisruptionbudget
kgpdb kubectl get poddisruptionbudget
kgpdbl kubectl get poddisruptionbudget -l
kgpdbw kubectl get poddisruptionbudget -o wide
kgpdbwa kubectl get poddisruptionbudget --watch
kgpdby kubectl get poddisruptionbudget -o yaml
kepdb kubectl edit poddisruptionbudget
kepdbl kubectl edit poddisruptionbudget -l
kdelpdb kubectl delete poddisruptionbudget
priorityclass: pc kdpc kubectl describe priorityclass
kgpc kubectl get priorityclass
kgpcl kubectl get priorityclass -l
kgpcw kubectl get priorityclass -o wide
kgpcwa kubectl get priorityclass --watch
kgpcy kubectl get priorityclass -o yaml
kepc kubectl edit priorityclass
kepcl kubectl edit priorityclass -l
kdelpc kubectl delete priorityclass
replicationcontroller: rc kdrc kubectl describe replicationcontroller
kgrc kubectl get replicationcontroller
kgrcl kubectl get replicationcontroller -l
kgrcw kubectl get replicationcontroller -o wide
kgrcwa kubectl get replicationcontroller --watch
kgrcy kubectl get replicationcontroller -o yaml
kerc kubectl edit replicationcontroller
kercl kubectl edit replicationcontroller -l
kdelrc kubectl delete replicationcontroller
replicaset: rs kdrs kubectl describe replicaset
kgrs kubectl get replicaset
kgrsl kubectl get replicaset -l
kgrsw kubectl get replicaset -o wide
kgrswa kubectl get replicaset --watch
kgrsy kubectl get replicaset -o yaml
kers kubectl edit replicaset
kersl kubectl edit replicaset -l
kdelrs kubectl delete replicaset
serviceaccount: sa kdsa kubectl describe serviceaccount
kgsa kubectl get serviceaccount
kgsal kubectl get serviceaccount -l
kgsaw kubectl get serviceaccount -o wide
kgsawa kubectl get serviceaccount --watch
kgsay kubectl get serviceaccount -o yaml
kesa kubectl edit serviceaccount
kesal kubectl edit serviceaccount -l
kdelsa kubectl delete serviceaccount
secret: sec kdsec kubectl describe secret
kgsec kubectl get secret
kgsecl kubectl get secret -l
kgsecw kubectl get secret -o wide
kgsecwa kubectl get secret --watch
kgsecy kubectl get secret -o yaml
kesec kubectl edit secret
kesecl kubectl edit secret -l
kdelsec kubectl delete secret
statefulset: sts kdsts kubectl describe statefulset
kgsts kubectl get statefulset
kgstsl kubectl get statefulset -l
kgstsw kubectl get statefulset -o wide
kgstswa kubectl get statefulset --watch
kgstsy kubectl get statefulset -o yaml
kests kubectl edit statefulset
kestsl kubectl edit statefulset -l
kdelsts kubectl delete statefulset
service: svc kdsvc kubectl describe service
kgsvc kubectl get service
kgsvcl kubectl get service -l
kgsvcw kubectl get service -o wide
kgsvcwa kubectl get service --watch
kgsvcy kubectl get service -o yaml
kesvc kubectl edit service
kesvcl kubectl edit service -l
kdelsvc kubectl delete service
scale cronjob: cj kccj kubectl create cronjob
scale configmap: cm kccm kubectl create configmap
scale clusterrole: cr kccr kubectl create clusterrole
scale clusterrolebinding: crb kccrb kubectl create clusterrolebinding
scale deployment: dep kcdep kubectl create deployment
scale deployment: deploy kcdep kubectl create deployment
scale ingress: ing kcing kubectl create ingress
scale job: j kcj kubectl create job
scale namespace: ns kcns kubectl create namespace
scale priorityclass: pc kcpc kubectl create priorityclass
scale poddisruptionbudget: pdb kcpdb kubectl create poddisruptionbudget
scale serviceaccount: sa kcsa kubectl create serviceaccount
scale secret: sec kcsec kubectl create secret
scale service: svc kcsvc kubectl create service
rollout * deployment: dep krhdep kubectl rollout history deployment
krpdep kubectl rollout pause deployment
krrdep kubectl rollout restart deployment
krresdep kubectl rollout resume deployment
krsdep kubectl rollout status deployment
krudep kubectl rollout undo deployment
rollout * deployment: deploy krhdeploy kubectl rollout history deployment
krpdeploy kubectl rollout pause deployment
krrdeploy kubectl rollout restart deployment
krresdeploy kubectl rollout resume deployment
krsdeploy kubectl rollout status deployment
krudeploy kubectl rollout undo deployment
rollout * replicationcontroller: rc krhrc kubectl rollout history replicationcontroller
krprc kubectl rollout pause replicationcontroller
krrrc kubectl rollout restart replicationcontroller
krresrc kubectl rollout resume replicationcontroller
krsrc kubectl rollout status replicationcontroller
krurc kubectl rollout undo replicationcontroller
rollout * replicaset: rs krhrs kubectl rollout history replicaset
krprs kubectl rollout pause replicaset
krrrs kubectl rollout restart replicaset
krresrs kubectl rollout resume replicaset
krsrs kubectl rollout status replicaset
krurs kubectl rollout undo replicaset
rollout * statefulset: sts krhsts kubectl rollout history statefulset
krpsts kubectl rollout pause statefulset
krrsts kubectl rollout restart statefulset
krressts kubectl rollout resume statefulset
krssts kubectl rollout status statefulset
krusts kubectl rollout undo statefulset
scale deployment: dep ksdep kubectl scale deployment --replicas
scale deployment: deploy ksdeploy kubectl scale deployment --replicas
scale replicationcontroller: rc ksrc kubectl scale replicationcontroller --replicas
scale replicaset: rs ksrs kubectl scale replicaset --replicas