Krew Plugin Manager for Kubectl
5 min readOct 30, 2024
Krew is a plugin manager for kubectl
that allows you to easily discover, install, and manage plugins that extend the functionality of kubectl
. These plugins can enhance the Kubernetes CLI experience by adding custom commands and tools. Krew works like a package manager, similar to apt
or brew
, but specifically for kubectl
plugins.
Key Features of Krew:
- Plugin Discovery: Browse and search for community-contributed
kubectl
plugins. - Easy Installation: Install and manage plugins using simple commands.
- Cross-platform Support: Available for Linux, macOS, and Windows.
1. Installing Krew
Krew can be installed on various platforms. Below are instructions for the most common environments.
On macOS and Linux
To install Krew, use the following shell commands:
(
set -x; cd "$(mktemp -d)" &&
OS="$(uname | tr '[:upper:]' '[:lower:]')" &&
ARCH="$(uname -m | sed 's/x86_64/amd64/' | sed 's/arm.*$/arm/')" &&
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
)