Hi all , does autocomplete work in the exam environment?

balaji:
Hi all , does autocomplete work in the exam environment?

VIP:
https://kubernetes.io/docs/reference/kubectl/cheatsheet/

ajay jha:
@balaji you need to manually

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.

balaji:
Thanks so this will enable all kubectl commands right eg kubectl ge tab key po tab key will complete kubectl get pods .

Tej_Singh_Rana:
Hello, @balaji
Clear instructions are given in this page:-
https://kubernetes.io/docs/tasks/tools/included/optional-kubectl-configs-bash-linux/

balaji:
Thanks Tej

Remo Mattei:
keep in mind that kubectl != to k for autocompletion

Remo Mattei:
so if you want autocompletion for k you need to make this change source <(kubectl completion bash|sed s/kubectl/k/g)

Remo Mattei:
then alias k=kubectl now you do have autocompletion with k