kubectl is the command-line tool used to work on Kubernetes clusters. You can use it to create application resources and cluster resources, interact with running containers, and manage the cluster.
This command outputs the shell code to execute to make the auto-completion work with the kubectl command. Its simplest usage is to “source” its output that will make auto-completion available for the current shell session:
or, if using the zsh shell: