Concepts
Krew is a tool that makes it easy to use kubectl plugins. Krew helps you discover plugins, install and manage them on your machine. It is similar to tools like apt, dnf or brew. Today, over 100 kubectl plugins are available on Krew.
Quick start
Installation (Linux/macOS)
- Install krew with this command line :
(
set -x; cd "$(mktemp -d)" &&
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/krew.tar.gz" &&
tar zxvf krew.tar.gz &&
KREW=./krew-"$(uname | tr '[:upper:]' '[:lower:]')_$(uname -m | sed -e 's/x86_64/amd64/' -e 's/arm.*$/arm/' -e 's/aarch64$/arm64/')" &&
"$KREW" install krew
)
- Then export it in environment variable :
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
Plugins
https://krew.sigs.k8s.io/plugins/
You can install plugins with this command line :
kubectl krew install <PLUGIN_NAME>
Example :
kubectl krew install access-matrix
kubectl access-matrix
Popular Plugins :
kubectl krew install popeye
kubectl krew install score
kubectl krew install ctx
kubectl krew install ns
Top comments (2)
Is Krew official? How does it compare to Helm?
Krew is an unofficial package that allows to install some k8S related package/plugins.
Helm Charts allows to deploy kubernetes ressources with yaml templates.