Skip to main content

kubectl

Completion plus ~100 k-prefixed aliases for kubectl. StumpCloud runs on Compose, not k8s, so this earns its keep in work/client contexts — the highest-value subset:

AliasRuns
kkubectl
kgp / kgpaget pods / across all namespaces
klflogs -f
ketiexec -t -i (shell into a container)
kdpdescribe pods
kgeevents sorted by .lastTimestamp
kafapply -f
kccc / kcuccurrent-context / use-context
kcnset namespace on current context
krrdrollout restart deployment

Pro tips

  • Completion is cached smartly: the plugin regenerates $ZSH_CACHE_DIR/completions/_kubectl in the background on shell start, so you get full completion without paying the kubectl completion zsh startup tax every time. If completion goes stale after a kubectl upgrade, delete that file and open a new shell.
  • The triage chain to memorize: kgpkdp <pod>klf <pod>keti <pod> -- sh. Four aliases cover 90% of "why is this pod sad".
  • kge sorts events by timestamp — genuinely more useful than default get events ordering when something just broke.
  • kca <anything> runs any kubectl command with --all-namespaces bolted on.
  • kj get pod foo pipes -o json through jq; ky does YAML through yh — both with completion intact.