Skip to content

Commit caaaefb

Browse files
authored
Merge pull request #44680 from fbauzac/patch-1
install-kubectl-linux.md: add chmods
2 parents 8a8b914 + d798896 commit caaaefb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/en/docs/tasks/tools/install-kubectl-linux.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ The following methods exist for installing kubectl on Linux:
139139
# If the folder `/etc/apt/keyrings` does not exist, it should be created before the curl command, read the note below.
140140
# sudo mkdir -p -m 755 /etc/apt/keyrings
141141
curl -fsSL https://pkgs.k8s.io/core:/stable:/{{< param "version" >}}/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
142+
sudo chmod 644 /etc/apt/keyrings/kubernetes-apt-keyring.gpg # allow unprivileged APT programs to read this keyring
142143
```
143144

144145
{{< note >}}
@@ -151,6 +152,7 @@ In releases older than Debian 12 and Ubuntu 22.04, folder `/etc/apt/keyrings` do
151152
```shell
152153
# This overwrites any existing configuration in /etc/apt/sources.list.d/kubernetes.list
153154
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/{{< param "version" >}}/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list
155+
sudo chmod 644 /etc/apt/sources.list.d/kubernetes.list # helps tools such as command-not-found to work correctly
154156
```
155157

156158
{{< note >}}

0 commit comments

Comments
 (0)