krew kubectl plugin manager
Light · Postcard
102 × 152 mm · PDF
Dark · Postcard
102 × 152 mm · PDF
Ink saver · Postcard
102 × 152 mm · PDF
Light · A4 landscape
297 × 210 mm · PDF
Dark · A4 landscape
297 × 210 mm · PDF
Ink saver · A4 landscape
297 × 210 mm · PDF
Light · A3 landscape
420 × 297 mm · PDF
Dark · A3 landscape
420 × 297 mm · PDF
Ink saver · A3 landscape
420 × 297 mm · PDF
Start here
kubectl krew update
kubectl krew search
kubectl krew search <keyword>
kubectl krew info <plugin>
kubectl krew install <plugin>
kubectl <plugin>
kubectl krew list
kubectl krew upgrade
Concepts
- Index git repo of manifests
- search / info find a plugin
- ~/.krew/bin on your PATH
- Run as a kubectl command
Setup
export
PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
kubectl krewset -gx PATH $PATH $HOME/.krew/bin
export KREW_ROOT=<dir>
rm -rf -- ~/.krew
export KREW_NO_UPGRADE_CHECK=1
Discover
kubectl krew update
kubectl krew search
kubectl krew search <keyword>
kubectl krew info <plugin>
Install and run
kubectl krew install <plugin>
kubectl krew install <plugin> <plugin>
kubectl <plugin>
kubectl krew install <index>/<plugin>
kubectl plugin list
Manage
kubectl krew list
kubectl krew upgrade
kubectl krew upgrade <plugin>...
kubectl krew uninstall <plugin>...
kubectl krew list | tee backup.txt
kubectl krew install < backup.txt
Indexes
kubectl krew index list
kubectl krew index add <name> <git-uri>
kubectl krew index remove <name>
export KREW_DEFAULT_INDEX_URI=<git-uri>
kubectl krew install --enable-netrc
<index>/<plugin>
kubectl krew install --netrc-file <path>
<index>/<plugin>
export HTTPS_PROXY="<host:port>"
Recipes
kubectl krew updatekubectl krew search treekubectl krew info treekubectl krew install treekubectl tree deployment <name>
# old machinekubectl krew list | tee backup.txt# new machine, after installing krewkubectl krew install < backup.txt
kubectl krew updatekubectl krew upgradekubectl krew list
kubectl krew index add corp git@github.com:corp/krew-index.gitkubectl krew searchkubectl krew install corp/<plugin>



