Skip to content

Commit

Permalink
Merge pull request #38122 from Kartik494/updatedocs
Browse files Browse the repository at this point in the history
Modify manually managed  key for apt repositories
  • Loading branch information
k8s-ci-robot authored Nov 29, 2022
2 parents 42737a1 + 9e552ab commit abc42e0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ For more information on version skews, see:
2. Download the Google Cloud public signing key:

```shell
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
sudo curl -fsSLo /etc/apt/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
```

3. Add the Kubernetes `apt` repository:

```shell
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
```

4. Update `apt` package index, install kubelet, kubeadm and kubectl, and pin their version:
Expand All @@ -172,6 +172,10 @@ For more information on version skews, see:
sudo apt-get install -y kubelet kubeadm kubectl
sudo apt-mark hold kubelet kubeadm kubectl
```
{{< note >}}
In releases older than Debian 12 and Ubuntu 22.04, `/etc/apt/keyrings` does not exist by default.
You can create this directory if you need to, making it world-readable but writeable only by admins.
{{< /note >}}

{{% /tab %}}
{{% tab name="Red Hat-based distributions" %}}
Expand Down
8 changes: 6 additions & 2 deletions content/en/docs/tasks/tools/install-kubectl-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ For example, to download version {{< param "fullversion" >}} on Linux, type:
2. Download the Google Cloud public signing key:

```shell
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
sudo curl -fsSLo /etc/apt/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
```

3. Add the Kubernetes `apt` repository:

```shell
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
```

4. Update `apt` package index with the new repository and install kubectl:
Expand All @@ -135,6 +135,10 @@ For example, to download version {{< param "fullversion" >}} on Linux, type:
sudo apt-get update
sudo apt-get install -y kubectl
```
{{< note >}}
In releases older than Debian 12 and Ubuntu 22.04, `/etc/apt/keyrings` does not exist by default.
You can create this directory if you need to, making it world-readable but writeable only by admins.
{{< /note >}}

{{% /tab %}}

Expand Down

0 comments on commit abc42e0

Please sign in to comment.