Don't waste any more time trying to remember those suffixes in your terminal; with Auto Kube, you can type your commands in a highly abbreviated way.

SRE/Kubernetes Admin
Mateus Caruccio

Tired of typing long and boring kubectl commands? Can't remember the aliases created by others? Tired of creating meaningless scripts, functions, and aliases?
Your troubles are over!
The amazing Auto Kubectl has arrived! - https://github.com/caruccio/autokube
With it, you type (practically) all kubectl parameters in a super abbreviated way.
Impress your family and friends by typing this:
Instead of this:
Just start the command with the letter k and the rest is translated into the corresponding parameters.
For example:
Some abbreviations have parameters that are used in the final command. For example,
nrequires a parameter with the namespace, andlrequires one or more labels.
But best of all, you don't need to learn the order. Each abbreviation is resolved from a pre-defined table that maps one or more characters to one or more kubectl parameters. The only rule is to follow the sequence verb -> resource -> option.
The order of the parameters after the command k... respects the order in which the abbreviations appear in it. Thus, the command kgponl default app=web becomes kubectl get pods --namespace=default -l=app=web, while the command kgpoln app=web default becomes kubectl get pods -l=app=web --namespace=default. Note that n and l swap places, therefore their parameters invert their order on the command line.
Prefixes and Suffixes
In addition to the kubectl parameters, you can use prefixes and suffixes in the final command.
For example, to execute kubectl with the time command in front, use:
The final command will be:
Prefixes are defined using the character - and an optional abbreviation. The following native options already exist:
The prefix -w is treated in a special way, and allows a value for its flag -n to be defined alongside it, in the format -w[N]. If not defined, the default value of [N] is 2.
The final commands will be:
Suffixes can be used in the same way, but using the abbreviation +. The native suffixes are:
Prefixes and suffixes can be used together:
With the final command being:
Installation
To install it is simple. Just download the git repository and source the autokubectl.sh.
It works as a hook that executes when a command is not found by the running shell. Therefore, if the command/alias/function kgpo already exists, then this one will be executed instead of autokubectl. It is up to you to decide which commands you want to keep and which ones you want to run via autokubectl.
The command above clones the repository to the local directory (choose one of your preference) and installs the source in your ~/.bashrc, ~/.zshrc. If neither exists, the file used will be ~/.profile.
You need to start a new shell session, or to use it immediately run source ~/.bashrc (or source ~/.zshrc).
If you wish to install it on the operating system, run the command
The latter only copies the necessary scripts to /usr/local/bin and /etc/profile.d.
Configuration
To create or modify abbreviations, simply add them to the files /etc/autokubectl or ~/.autokubectl. These files are read every time autokubectl is executed and take effect immediately.
Now you can use:
With the final commands being:

Conclusion
For more details on the importance of using our tools in a more agile way, check out Marcelo Melo's article at getup.io/blog/dicas-aliases.
As you can see, there are a thousand ways to run kubectl. Invent yours!
Newsletter Getup.
Atualizações sobre Kubernetes e Software Supply Chain Security todos os meses.
Operating Kubernetes in production for more than 13 years. With Quor, this experience extends to software supply chain security as well.
GET UP
© Getup · 2026
