Fix kubectl autocompletion may only work on root

The current instructions creates a /etc/bash_completion.d/kubectl file with the default file permission, and may not always contain the necessary global read permission for all users of the system to use the config. This is fixed by adding a chmod command that adds the missing permisison, in case it is missing
pull/37368/head
Huang Zou 2022-10-18 14:00:09 -04:00 committed by GitHub
parent c02f3e0136
commit 608663e049
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ echo 'source <(kubectl completion bash)' >>~/.bashrc
{{< /tab >}}
{{< tab name="System" codelang="bash" >}}
kubectl completion bash | sudo tee /etc/bash_completion.d/kubectl > /dev/null
sudo chmod a+r /etc/bash_completion.d/kubectl
{{< /tab >}}
{{< /tabs >}}