Is auto complete enabled in CKAD exam?

Hi Experts,

Is autocomplete enabled in CKAD exam ? for example, If I type " kubectl get depl" and then press tab will automatically compelete the matching resource ( like deployment in this case ) ? Also will it also autocmplete the the actual ressource name ? for example “kubectl get deploy my-own-dep” and then press tab ( if I have a deployment called my-own-deployment-1sdwe34" ?

Thanks

It’s set up for you. It’s worth knowing how to do it yourself (it’s in the K8s cheatsheet), but it will be working for you already.

I can’t seem to get it working from the command on cheat sheet in k8s site. Can you please help to share that… Consider I am running below as OS and my k8s version is

“RHEL” , VERSION="8.9 "
k8s version : what i have is 1.25

What shell are you using? With bash, it’s pretty easy.

  1. First, make sure that kubectl works on your system.
  2. Add the following to your .bashrc file:
[ -f /etc/bash_completion ] && /etc/bash_completion
source <(kubectl completion bash)
alias k=kubectl
complete -o default -F __start_kubectl k

While v1.25 is pretty long in the tooth, the above has worked for a long time too. Should work for you.