Finding and Installing Plugins
Krew provides a searchable index of kubectl plugins. Knowing how to find and evaluate plugins helps you extend kubectl with capabilities tailored to your workflow.
Searching for Plugins
# Search the full plugin index
kubectl krew search
# Search by keyword
kubectl krew search context
kubectl krew search namespace
kubectl krew search security
# Get details about a specific plugin
kubectl krew info ctx
The info command shows the plugin description, version, homepage, and supported platforms.
Popular Plugins
These plugins are widely used and solve common pain points:
# ctx - switch between contexts quickly
kubectl krew install ctx
kubectl ctx # lists contexts, select one to switch
# ns - switch between namespaces quickly
kubectl krew install ns
kubectl ns # lists namespaces, select one to switch
# neat - clean up YAML output by removing cluster-managed fields
kubectl krew install neat
kubectl get pod my-app -o yaml | kubectl neat
# access-matrix - show RBAC access for resources
kubectl krew install access-matrix
kubectl access-matrix # shows who can do what
# tree - show resource hierarchy
kubectl krew install tree
kubectl tree deploy my-app # shows owned ReplicaSets and Pods
# images - list container images in the cluster
kubectl krew install images
kubectl images -A
Installing and Managing Plugins
# Install a plugin
kubectl krew install neat
# Upgrade a specific plugin
kubectl krew upgrade neat
# Upgrade all installed plugins
kubectl krew upgrade
# Remove a plugin
kubectl krew uninstall neat
# List all installed plugins
kubectl krew list
Checking Available Updates
# Update the plugin index first
kubectl krew update
# Then upgrade plugins
kubectl krew upgrade
Key Takeaways
- Use
kubectl krew searchto browse available plugins by keyword ctxandnsare must-have plugins for fast context and namespace switchingneatcleans up YAML output for readability and version control- Keep plugins updated with
krew updatefollowed bykrew upgrade