With the introduction of custom subcommands in Kubernetes version 1.12, the kubectl
command line tool became even more powerful for DevOps engineers. These plugins extend kubectl
’s functionality, allowing you to streamline repetitive tasks, partially automate processes, and improve your day-to-day workflow as a Kubernetes operator.
To create or install a plugin for kubectl
, simply place an executable or script in your system’s PATH
or a directory specified by the $PATH
environment variable. For example, kubectl-all
installed in /usr/local/bin
, can effortlessly invoked as a subcommand: kubectl all
. No additional configuration or registration is necessary. Detailed instructions can be found in the official documentation.
An ecosystem has already developed around the Krew plugin manager, and there are many great plugins available, but here are some neat subcommands that I use frequently myself for day-to-day troubleshooting, monitoring, and operational tasks.