Krew
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.
Installation⚑
-
Run this command to download and install krew:
( set -x; cd "$(mktemp -d)" && OS="$(uname | tr '[:upper:]' '[:lower:]')" && ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" && KREW="krew-${OS}_${ARCH}" && curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" && tar zxvf "${KREW}.tar.gz" && ./"${KREW}" install krew )
-
Add the
$HOME/.krew/bin
directory to your PATH environment variable. To do this, update your.bashrc
or.zshrc
file and append the following line:
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
-
Restart your shell.
-
Run
kubectl krew
to check the installation.