kubectl-aliases is a small but extremely handy project that generates hundreds of shell aliases for kubectl so you no longer have to type long commands and flags repeatedly. It ships a prebuilt .kubectl_aliases file for Bash/Zsh, plus variants for Fish and Nushell, which you drop into your home directory and source from your shell config. The aliases are programmatically generated from permutations of common verbs, resources, flags, and options, so you get short forms like kgpo for kubectl get pod and more complex ones that include namespaces, label selectors, and output formats. This dramatically speeds up interactive Kubernetes workflows, especially when you spend a lot of time inspecting pods, services, deployments, and logs. The repository also includes a Python script used to generate the aliases, which advanced users can tweak if they want a custom alias set. It is distributed under the Apache-2.0 license and is widely used by Kubernetes practitioners.
Features
- Hundreds of prebuilt aliases covering common kubectl verbs, resources, and flags
- Ready-to-use .kubectl_aliases files for Bash, Zsh, Fish, and Nushell
- Programmatic generation via a Python script so alias sets can be customized
- Short, memorable alias patterns like k, kg, kgpo, ksysgpo for frequent operations
- Simple installation by downloading one file into $HOME and sourcing from shell config
- Apache-2.0 licensed and battle-tested by many Kubernetes users