79410004

Date: 2025-02-03 21:00:26
Score: 0.5
Natty:
Report link

Using sudo -i might work for autocompletion for the root user as it is set up properly. But for regular users, it might need appropriate shell configuration or a package is not installed by default.

To enable shell autocompletion you need to install bash-completion package :

apt-get install bash-completion

After installing you need generate the required kubectl completion script :

echo 'source <(kubectl completion bash)' >>~/.bashrc

To enable bash autocompletion in current session run the command below :

source ~/.bashrc

For additional information follow this documentation for further guidance.

Reasons:
  • Blacklisted phrase (1): this document
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: miracle