kubekey/docs/kubectl-autocompletion.md
pixiake 0fe51c0cb0 update docs
Signed-off-by: pixiake <guofeng@yunify.com>
2020-08-29 17:21:25 +08:00

649 B

Enable kubectl autocompletion

KubeKey doesn't enable kubectl autocompletion. Refer to the guide below and turn it on:

Prerequisite: make sure bash-autocompletion is installed and works.

# Install bash-completion
apt-get install bash-completion

# Source the completion script in your ~/.bashrc file
echo 'source <(kubectl completion bash)' >>~/.bashrc

# Add the completion script to the /etc/bash_completion.d directory
kubectl completion bash >/etc/bash_completion.d/kubectl

More detail reference could be found here.