0

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?

Rashack
  • 4,667
  • 2
  • 26
  • 35
Luca Rasconi
  • 1,085
  • 11
  • 30

1 Answers1

1

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

Luca Rasconi
  • 1,085
  • 11
  • 30