kubectl krew

ID

krew

Links

Home page · Documentation · Repository

Upstream stars

⭐ 7,041

Last commit

2026-09-18

Version requirement

>= 0.4

Platforms

🅱️ BSD · 🐧 Linux · 🍎 macOS · ⨂ Unix · 🪟 Windows

Operations

installed · search · install · upgrade · upgrade_all · remove · sync

purl types

pkg:krew/

CLI names (lookup order)

kubectl-krew · krew

Forced environment

NO_COLOR=1

Issues and PRs

📦 manager: krew

Source

krew.toml

krew is the plugin manager of kubectl (https://krew.sigs.k8s.io), installed as the kubectl-krew binary and driven either directly or as kubectl krew.

krew list branches on whether stdout is a terminal: piped, as mpm always runs it, it prints the sorted plugin names one per line and nothing else, while an interactive run gets a PLUGIN/VERSION table instead. The parser below reads the piped form, so installed plugins carry no version. That is a deliberate upstream choice (the !isTerminal(os.Stdout) branch of cmd/krew/cmd/list.go), not a limitation mpm can work around.

No outdated: krew compares nothing against its index short of running the upgrade, so the operation is left undeclared and upgrade --all still works.

What mpm adds to krew

Through mpm, krew gains --exact and --extended search, to narrow to exact names or match descriptions.

Bigger still, mpm reaches across every manager at once: mpm installed and mpm outdated cover krew alongside every other manager you run in one table, mpm upgrade --all updates them together, and mpm sbom exports the whole machine as one bill of materials.

Every mpm command also gains --dry-run and --plan previews, cross-scheme version comparison and purl identifiers. See manager augmentations for how each one is built.

Your krew commands, in mpm

You already know krew: each operation maps one-to-one onto mpm, in an interface shared by every manager.

To…

With krew

With mpm

List what’s installed

kubectl-krew list

mpm --krew installed

Search for a package

kubectl-krew search <query>

mpm --krew search <query>

Install a package

kubectl-krew install <package_id>

mpm install pkg:krew/<package_id>

Upgrade one package

kubectl-krew upgrade <package_id>

mpm --krew upgrade <package_id>

Upgrade everything

kubectl-krew upgrade

mpm --krew upgrade --all

Remove a package

kubectl-krew uninstall <package_id>

mpm remove pkg:krew/<package_id>

Prefix any command above with --dry-run to simulate the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.

Operations

Operation

Supported

Notes

installed

✅

outdated

orphans

search

✅

Exact and extended search backfilled by mpm.

install

✅

upgrade

✅

upgrade_all

✅

remove

✅

sync

✅

cleanup

doctor

Configuration

  • Ignore krew on the mpm CLI by passing the --no-krew option.

  • Ignore it for every run in your configuration:

    [mpm]
    krew = false
    
  • Raise the timeout of all krew calls:

    [mpm.overrides.krew]
    timeout = 900
    
  • Run mpm config-template krew to print all overridable settings for your configuration file:

    [mpm.overrides.krew]
    cli_names = [
        "kubectl-krew",
        "krew",
    ]
    cli_search_path = []
    dry_run = false
    ignore_auto_updates = true
    plan = false
    post_args = []
    pre_args = []
    pre_cmds = []
    requirement = ">=0.4.0"
    stop_on_error = false
    unmaintained = false
    version_cli_options = [
        "--version",
    ]
    version_regexes = [
        "GitTag\\s+v?(?P<version>\\S+)",
    ]
    
    [mpm.overrides.krew.extra_env]
    NO_COLOR = "1"
    

The arguments and environment variables listed in the box atop this page are forced on every krew call, so runs stay quiet, non-interactive and reproducible: the defaults you would set in CI anyway.

Recipes

A few jobs you would otherwise script around krew, one mpm command each:

  • Snapshot and clone a machine: mpm --krew dump krew.toml, then mpm restore krew.toml on the next one.

  • Export a compliance SBOM: mpm --krew sbom (CycloneDX by default, --spdx for SPDX).

Privilege escalation

mpm runs this manager as the current user and never prepends sudo by default. Flip the policy for its privileged operations with --sudo or the per-manager sudo override.

None of its operations is privileged.

See privilege escalation for the full policy.

Cooldown

State of kubectl krew’s release-age gating, from the cooldown support table:

Status: ❌ None

A cooldown only pays off where a compromised release can be withdrawn while the clock runs, and can only be emulated where the registry dates its releases. From the retraction table:

  • Registry: Git-manifest indexes

  • Retraction: Index revert: reverting the manifest, Portfile or derivation commit withdraws the version

  • Publish date: ❌ only the commit date, which is client-set and trivially backdated. A date declared in the manifest, like winget’s optional ReleaseDate, is author-supplied too and no sounder

With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --cooldown best-effort opts back in.

Reference traces

A collection of raw native outputs captured from the manager’s own CLI and recorded in the bundled definition. If you know kubectl krew well and a transcript below looks wrong, or a newer release changed its output format, report it.

$ kubectl-krew list
access-matrix
ctx
ns
tree
$ kubectl-krew search {query}
NAME           DESCRIPTION                                          INSTALLED
access-matrix  Show an RBAC access matrix for server resources      yes
ktop           A top-like tool for your Kubernetes clusters         no
tree           Show sub-resources of the Kubernetes object          yes

Version check

The version is probed by running:

$ kubectl-krew --version
OPTION            VALUE
GitTag            v0.4.4
GitCommit         343e657
IndexURI          https://github.com/kubernetes-sigs/krew-index.git
BasePath          /home/kev/.krew
IndexPath         /home/kev/.krew/index/default
InstallPath       /home/kev/.krew/store
BinPath           /home/kev/.krew/bin
DetectedPlatform  linux/amd64

and extracted with:

r"GitTag\s+v?(?P<version>\S+)"

Upstream project

Metrics

kubernetes-sigs/krew

Activity

commit activity commits since open issues open pull requests

Popularity

forks watchers contributors

Metadata

latest release release date license main language

Changelog

  • 8.0.0 (2026-09-20)

    • Add the krew kubectl plugin manager with installed, search, install, upgrade, remove and sync support. Its piped listing carries no version.