Skip to content

Commit f8da02e

Browse files
authored
Merge pull request #43407 from xmudrii/remove-legacy-repos
Remove instructions for legacy package repos
2 parents 43742e8 + 7d706d9 commit f8da02e

File tree

4 files changed

+30
-113
lines changed

4 files changed

+30
-113
lines changed

content/en/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md

Lines changed: 7 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -149,29 +149,16 @@ For more information on version skews, see:
149149
* Kubeadm-specific [version skew policy](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#version-skew-policy)
150150

151151
{{< note >}}
152-
Kubernetes has two different package repositories starting from August 2023.
153-
The Google-hosted repository is deprecated and it's being replaced with the
154-
Kubernetes (community-owned) package repositories. The Kubernetes project strongly
155-
recommends using the Kubernetes community-owned package repositories, because the
156-
project plans to stop publishing packages to the Google-hosted repository in the future.
157-
158-
There are some important considerations for the Kubernetes package repositories:
159-
160-
- The Kubernetes package repositories contain packages beginning with those
161-
Kubernetes versions that were still under support when the community took
162-
over the package builds. This means that anything before v1.24.0 will only be
163-
available in the Google-hosted repository.
164-
- There's a dedicated package repository for each Kubernetes minor version.
165-
When upgrading to a different minor release, you must bear in mind that
166-
the package repository details also change.
167-
152+
Kubernetes has [new package repositories hosted at `pkgs.k8s.io`](/blog/2023/08/15/pkgs-k8s-io-introduction/)
153+
starting from August 2023. The legacy package repositories (`apt.kubernetes.io` and `yum.kubernetes.io`)
154+
have been frozen starting from September 13, 2023. Please read our
155+
[deprecation and freezing announcement](/blog/2023/08/31/legacy-package-repository-deprecation/)
156+
for more details.
168157
{{< /note >}}
169158

170159
{{< tabs name="k8s_install" >}}
171160
{{% tab name="Debian-based distributions" %}}
172161

173-
### Kubernetes package repositories {#dpkg-k8s-package-repo}
174-
175162
These instructions are for Kubernetes {{< skew currentVersion >}}.
176163

177164
1. Update the `apt` package index and install packages needed to use the Kubernetes `apt` repository:
@@ -208,49 +195,13 @@ In releases older than Debian 12 and Ubuntu 22.04, `/etc/apt/keyrings` does not
208195
you can create it by running `sudo mkdir -m 755 /etc/apt/keyrings`
209196
{{< /note >}}
210197

211-
### Google-hosted package repository (deprecated) {#dpkg-google-package-repo}
212-
213-
These instructions are for Kubernetes {{< skew currentVersion >}}.
214-
215-
1. Update the `apt` package index and install packages needed to use the Kubernetes `apt` repository:
216-
217-
```shell
218-
sudo apt-get update
219-
# apt-transport-https may be a dummy package; if so, you can skip that package
220-
sudo apt-get install -y apt-transport-https ca-certificates curl
221-
```
222-
223-
2. Download the Google Cloud public signing key:
224-
225-
```shell
226-
curl -fsSL https://dl.k8s.io/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg
227-
```
228-
229-
3. Add the Google-hosted `apt` repository:
230-
231-
```shell
232-
# This overwrites any existing configuration in /etc/apt/sources.list.d/kubernetes.list
233-
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
234-
```
235-
236-
4. Update the `apt` package index, install kubelet, kubeadm and kubectl, and pin their version:
237-
238-
```shell
239-
sudo apt-get update
240-
sudo apt-get install -y kubelet kubeadm kubectl
241-
sudo apt-mark hold kubelet kubeadm kubectl
242-
```
243-
244-
{{< note >}}
245-
In releases older than Debian 12 and Ubuntu 22.04, `/etc/apt/keyrings` does not exist by default;
246-
you can create it by running `sudo mkdir -m 755 /etc/apt/keyrings`
247-
{{< /note >}}
248-
249198
{{% /tab %}}
250199
{{% tab name="Red Hat-based distributions" %}}
251200

252201
1. Set SELinux to `permissive` mode:
253202

203+
These instructions are for Kubernetes {{< skew currentVersion >}}.
204+
254205
```shell
255206
# Set SELinux in permissive mode (effectively disabling it)
256207
sudo setenforce 0
@@ -266,10 +217,6 @@ sudo sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
266217
settings that are not supported by kubeadm.
267218
{{< /caution >}}
268219

269-
### Kubernetes package repositories {#rpm-k8s-package-repo}
270-
271-
These instructions are for Kubernetes {{< skew currentVersion >}}.
272-
273220
2. Add the Kubernetes `yum` repository. The `exclude` parameter in the
274221
repository definition ensures that the packages related to Kubernetes are
275222
not upgraded upon running `yum update` as there's a special procedure that
@@ -295,41 +242,6 @@ sudo yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
295242
sudo systemctl enable --now kubelet
296243
```
297244

298-
### Google-hosted package repository (deprecated) {#rpm-google-package-repo}
299-
300-
These instructions are for Kubernetes {{< skew currentVersion >}}.
301-
302-
2. Add the Google-hosted `yum` repository. The `exclude` parameter in the
303-
repository definition ensures that the packages related to Kubernetes are
304-
not upgraded upon running `yum update` as there's a special procedure that
305-
must be followed for upgrading Kubernetes.
306-
307-
```shell
308-
# This overwrites any existing configuration in /etc/yum.repos.d/kubernetes.repo
309-
cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
310-
[kubernetes]
311-
name=Kubernetes
312-
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-\$basearch
313-
enabled=1
314-
gpgcheck=1
315-
gpgkey=https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
316-
exclude=kubelet kubeadm kubectl
317-
EOF
318-
```
319-
320-
3. Install kubelet, kubeadm and kubectl, and enable kubelet to ensure it's automatically started on startup:
321-
322-
```shell
323-
sudo yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
324-
sudo systemctl enable --now kubelet
325-
```
326-
327-
{{< note >}}
328-
If the `baseurl` fails because your RPM-based distribution cannot interpret `$basearch`, replace `\$basearch` with your computer's architecture.
329-
Type `uname -m` to see that value.
330-
For example, the `baseurl` URL for `x86_64` could be: `https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64`.
331-
{{< /note >}}
332-
333245
{{% /tab %}}
334246
{{% tab name="Without a package manager" %}}
335247
Install CNI plugins (required for most pod network):

content/en/docs/tasks/administer-cluster/kubeadm/change-package-repository.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,23 @@ weight: 120
66

77
<!-- overview -->
88

9-
This page explains how to switch from one Kubernetes package repository to another
10-
when upgrading Kubernetes minor releases. Unlike deprecated Google-hosted
11-
repositories, the Kubernetes package repositories are structured in a way that
12-
there's a dedicated package repository for each Kubernetes minor version.
9+
This page explains how to enable a package repository for a new Kubernetes minor release
10+
for users of the community-owned package repositories hosted at `pkgs.k8s.io`.
11+
Unlike the legacy package repositories, the community-owned package repositories are
12+
structured in a way that there's a dedicated package repository for each Kubernetes
13+
minor version.
1314

1415
## {{% heading "prerequisites" %}}
1516

16-
This document assumes that you're already using the Kubernetes community-owned
17-
package repositories. If that's not the case, it's strongly recommended to migrate
18-
to the Kubernetes package repositories.
17+
This document assumes that you're already using the community-owned
18+
package repositories (`pkgs.k8s.io`). If that's not the case, it's strongly
19+
recommended to migrate to the community-owned package repositories as described
20+
in the [official announcement](/blog/2023/08/15/pkgs-k8s-io-introduction/).
1921

2022
### Verifying if the Kubernetes package repositories are used
2123

22-
If you're unsure whether you're using the Kubernetes package repositories or the
23-
Google-hosted repository, take the following steps to verify:
24+
If you're unsure whether you're using the community-owned package repositories or the
25+
legacy package repositories, take the following steps to verify:
2426

2527
{{< tabs name="k8s_install_versions" >}}
2628
{{% tab name="Ubuntu, Debian or HypriotOS" %}}
@@ -39,7 +41,8 @@ deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io
3941
```
4042

4143
**You're using the Kubernetes package repositories and this guide applies to you.**
42-
Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories.
44+
Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories
45+
as described in the [official announcement](/blog/2023/08/15/pkgs-k8s-io-introduction/).
4346

4447
{{% /tab %}}
4548
{{% tab name="CentOS, RHEL or Fedora" %}}
@@ -64,7 +67,8 @@ exclude=kubelet kubeadm kubectl
6467
```
6568

6669
**You're using the Kubernetes package repositories and this guide applies to you.**
67-
Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories.
70+
Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories
71+
as described in the [official announcement](/blog/2023/08/15/pkgs-k8s-io-introduction/).
6872

6973
{{% /tab %}}
7074

@@ -90,7 +94,8 @@ exclude=kubelet kubeadm kubectl
9094
```
9195

9296
**You're using the Kubernetes package repositories and this guide applies to you.**
93-
Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories.
97+
Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories
98+
as described in the [official announcement](/blog/2023/08/15/pkgs-k8s-io-introduction/).
9499

95100
{{% /tab %}}
96101
{{< /tabs >}}

content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ The upgrade workflow at high level is the following:
5454

5555
## Changing the package repository
5656

57-
If you're using the Kubernetes community-owned repositories, you need to change
58-
the package repository to one that contains packages for your desired Kubernetes
59-
minor version. This is explained in [Changing the Kubernetes package repository](/docs/tasks/administer-cluster/kubeadm/change-package-repository/)
57+
If you're using the community-owned package repositories (`pkgs.k8s.io`), you need to
58+
enable the package repository for the desired Kubernetes minor release. This is explained in
59+
[Changing the Kubernetes package repository](/docs/tasks/administer-cluster/kubeadm/change-package-repository/)
6060
document.
6161

6262
## Determine which version to upgrade to

content/en/docs/tasks/administer-cluster/kubeadm/upgrading-linux-nodes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ upgrade the control plane nodes before upgrading your Linux Worker nodes.
1919

2020
## Changing the package repository
2121

22-
If you're using the Kubernetes community-owned repositories, you need to change
23-
the package repository to one that contains packages for your desired Kubernetes
24-
minor version. This is explained in [Changing the Kubernetes package repository](/docs/tasks/administer-cluster/kubeadm/change-package-repository/)
22+
If you're using the community-owned package repositories (`pkgs.k8s.io`), you need to
23+
enable the package repository for the desired Kubernetes minor release. This is explained in
24+
[Changing the Kubernetes package repository](/docs/tasks/administer-cluster/kubeadm/change-package-repository/)
2525
document.
2626

2727
## Upgrading worker nodes

0 commit comments

Comments
 (0)