Enable kubectl autocompletion on aws cloudshell

573 Views Asked by At

I followed all the instructions in https://kubernetes.io/docs/tasks/tools/included/optional-kubectl-configs-bash-linux/ to enable kubectl autocompletion.

I've the line source <(kubectl completion bash) in ~/.bashrc

When I run the command . ./.bashrc the autocompletion works fine.
When the shell restarts autocompletion doesn't work.

What am I missing?

1

There are 1 best solutions below

0
On

I fixed the problem running kubectl completion bash > $HOME/.bash_completion