ConfigsApr 16, 2026·3 min read

Krew — Plugin Manager for kubectl

Discover, install, and manage kubectl plugins from a curated index. Krew makes extending the Kubernetes CLI as easy as brew install.

TL;DR
Krew is the package manager for kubectl plugins, maintained under Kubernetes SIGs with 200+ plugins.
§01

What it is

Krew is the official plugin manager for kubectl, maintained under the Kubernetes SIGs umbrella. It provides a discoverable, centrally maintained index of community-contributed kubectl plugins and handles installation, upgrades, and removal through a single CLI.

Krew is best for Kubernetes operators and developers who want to extend kubectl with context switching, log tailing, resource tree visualization, and dozens of other capabilities without manually downloading binaries.

§02

How it saves time or tokens

Without Krew, adding a kubectl plugin means finding the right GitHub release, downloading the correct binary for your OS and architecture, placing it in your PATH, and repeating this for updates. Krew reduces all of that to kubectl krew install <plugin>. Upgrades across all installed plugins run with a single kubectl krew upgrade command.

§03

How to use

  1. Install Krew following the official instructions (a self-bootstrapping kubectl plugin):
(set -x; cd "$(mktemp -d)" &&
  OS="$(uname | tr '[:upper:]' '[:lower:]')" &&
  ARCH="$(uname -m | sed 's/x86_64/amd64/;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)
  1. Add Krew to your PATH: export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
  2. Search and install plugins:
kubectl krew search ctx
kubectl krew install ctx
kubectl ctx
§04

Example

# Install popular plugins
kubectl krew install ctx        # Switch contexts quickly
kubectl krew install ns         # Switch namespaces
kubectl krew install neat       # Clean up kubectl output
kubectl krew install tree       # Show resource ownership tree

# List installed plugins
kubectl krew list

# Upgrade all plugins
kubectl krew upgrade
§05

Related on TokRepo

§06

Common pitfalls

  • Forgetting to add the Krew bin directory to your PATH after installation
  • Not running kubectl krew update before searching, which uses a stale plugin index
  • Installing plugins that conflict with existing kubectl aliases or shell functions

Frequently Asked Questions

Is Krew officially part of Kubernetes?+

Krew is maintained under the Kubernetes SIGs (Special Interest Groups) umbrella. It is not bundled with kubectl by default but is the recognized plugin manager endorsed by the Kubernetes project.

How many plugins does Krew have?+

The Krew index contains over 200 community-contributed plugins covering context switching, log viewing, resource management, security scanning, and more. The index is a Git repository anyone can contribute to.

Can I create my own Krew plugin?+

Yes. Write any executable named kubectl-myplugin, create a plugin manifest YAML describing download URLs and checksums, and submit a pull request to the krew-index repository. Krew handles cross-platform distribution.

Does Krew work on Windows?+

Yes. Krew supports Linux, macOS, and Windows. The installation script detects your OS and architecture automatically. On Windows, you can install via Scoop or follow the manual installation steps.

How do I update plugins installed with Krew?+

Run kubectl krew upgrade to update all installed plugins, or kubectl krew upgrade <plugin-name> to update a specific one. Run kubectl krew update first to refresh the plugin index.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets