How to Enable Tab Completion for the Kubectl Command
The shell is a bash group, but if it is bash, pressing a tab will complete the command. The kubectl command also completes in the shell, but the subcommands do not.
kubectl get pod is fine, but describe is a hassle. When I looked it up there, there was a function that complemented subcommands with tabs, so I tried it.
Setting environment variables
.bashrc and add the following line
source <(kubectl completion bash)
Reflect by dot execution.
root@vagrant:/home/vagrant# . .bashrc
by the author.