Krew – Plugin manager for Kubernetes kubectl
This project boosts around kubectl 146 plugins and you can easily just write your own if there is something that you want to add yourself.
Just 5 months ago in Nov, 2020 there were 100 plugins , so the community is really putting work into solving problems using plugins.
Krew is a plugin manager maintained by the Kubernetes SIG CLI community.
Its is a good idea to always talk about our clusters security, so I really need to mention here that none of these plugins are audited for security by the project owners.
What is Krew and why do I want it?
Krew acts just like apt , pip, or yum in that it distributes the plugins from a central repository or ‘plugin index ‘using a simple command like this one below.
kubectl krew install <PLUGIN>
There are so many different plugins already hosted for you to download. Here is just a few interesting ones
allctx – Run commands on contexts in your kubeconfig
bulk-action – Do bulk actions on Kubernetes resources.
cluster-group – Exec commands across a group of contexts
cost – View cluster cost information
ctx – Switch between contexts in your kubeconfig
custom-cols – A “kubectl get” replacement with customizable column presets
debug-shell – Create pod with interactive kube-shell.
doctor – Scans your cluster and reports anomalies.
evict-pod – Evicts the given pod
example – Prints out example manifest YAMLs
exec-as -Like kubectl exec, but offers a `user` flag to exec as root or any other user.
exec-cronjob – Run a CronJob immediately as Job
flame – Generate CPU flame graphs from pods
fleet – Shows config and resources of a fleet of clusters
fuzzy – Fuzzy and partial string search for kubectl
gadget – Gadgets for debugging and introspecting apps
get-all – Like `kubectl get all` but _really_ everything
graph – Visualize Kubernetes resources and relationships.
grep – Filter Kubernetes resources by matching their names
images -Show container images used in the cluster.
ingress-nginx – Interact with ingress-nginx
ipick – A kubectl wrapper for interactive resource selection.
janitor – Lists objects in a problematic state
konfig – Merge, split or import kubeconfig files
krew – Package manager for kubectl plugins.
mc – Run kubectl commands against multiple clusters at once
minio – Deploy and manage MinIO Operator and Tenant(s)
modify-secret – modify secret with implicit base64 translations
neat – Remove clutter from Kubernetes manifests to make them more readable.
node-restart – Restart cluster nodes sequentially and gracefully
node-shell – Spawn a root shell on a node via kubectl
np-viewer – Network Policies rules viewer
ns – Switch between Kubernetes namespaces
open-svc – Open the Kubernetes URL(s) for the specified service in your browser.
outdated – Finds outdated container images running in a cluster
passman – Store kubeconfig credentials in keychains or password managers
pod-dive – Shows a pod’s workload tree and info inside a node
pod-inspect – Get all of a pod’s details at a glance
pod-lens – Show pod-related resources
pod-logs – Display a list of pods to get logs from
pod-shell – Display a list of pods to execute a shell in
podevents – Show events for pods
popeye – Scans your clusters for potential resource issues
preflight – Executes application preflight tests in a cluster
promdump – Dumps the head and persistent blocks of Prometheus.
prompt – Prompts for user confirmation when executing commands in critical namespaces or clusters, i.e., production.
Develop Your Own
Want to write your own Krew plugins and/or add them to the krew index? Here is a step by step guide posted below.
https://krew.sigs.k8s.io/docs/developer-guide/
There are other ways to distribute plugin besides using the Krew index. See the Kubernetes docs for great detail into making plugins in and outside of Krew.
https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/
Get Krew
to get krew just follow the link and read the documentation to get started
