/CKA-Practice

Prepare for the Certified Kubernetes Administrators Certification

CKA-Practice

Prepare for the Certified Kubernetes Administrators Certification

Kubectl Autocomplete

BASH
source <(kubectl completion bash) # setup autocomplete in bash into the current shell, bash-completion package should be installed first.
echo "source <(kubectl completion bash)" >> ~/.bashrc # add autocomplete permanently to your bash shell.

You can also use a shorthand alias for kubectl that also works with completion:

alias k=kubectl
complete -F __start_kubectl k

Contents