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.
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.
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.
How to use
- 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)
- Add Krew to your PATH:
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" - Search and install plugins:
kubectl krew search ctx
kubectl krew install ctx
kubectl ctx
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
Related on TokRepo
- DevOps tools — broader Kubernetes and infrastructure tooling
- Automation tools — CLI automation resources
Common pitfalls
- Forgetting to add the Krew bin directory to your PATH after installation
- Not running
kubectl krew updatebefore searching, which uses a stale plugin index - Installing plugins that conflict with existing kubectl aliases or shell functions
Frequently Asked Questions
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.
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.
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.
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.
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)
- Krew GitHub Repository— Krew is maintained under Kubernetes SIGs
- Krew Plugin Index— 200+ community-contributed plugins in the index
- Kubernetes Docs— Krew plugin development guide
Related on TokRepo
Discussion
Related Assets
Conda — Cross-Platform Package and Environment Manager
Install, update, and manage packages and isolated environments for Python, R, C/C++, and hundreds of other languages from a single tool.
Sphinx — Python Documentation Generator
Generate professional documentation from reStructuredText and Markdown with cross-references, API autodoc, and multiple output formats.
Neutralinojs — Lightweight Cross-Platform Desktop Apps
Build desktop applications with HTML, CSS, and JavaScript using a tiny native runtime instead of bundling Chromium.