Remove instructions for legacy package repos
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>pull/43407/head
parent
f906b0625e
commit
7d706d9921
|
@ -149,29 +149,16 @@ For more information on version skews, see:
|
||||||
* Kubeadm-specific [version skew policy](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#version-skew-policy)
|
* Kubeadm-specific [version skew policy](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#version-skew-policy)
|
||||||
|
|
||||||
{{< note >}}
|
{{< note >}}
|
||||||
Kubernetes has two different package repositories starting from August 2023.
|
Kubernetes has [new package repositories hosted at `pkgs.k8s.io`](/blog/2023/08/15/pkgs-k8s-io-introduction/)
|
||||||
The Google-hosted repository is deprecated and it's being replaced with the
|
starting from August 2023. The legacy package repositories (`apt.kubernetes.io` and `yum.kubernetes.io`)
|
||||||
Kubernetes (community-owned) package repositories. The Kubernetes project strongly
|
have been frozen starting from September 13, 2023. Please read our
|
||||||
recommends using the Kubernetes community-owned package repositories, because the
|
[deprecation and freezing announcement](/blog/2023/08/31/legacy-package-repository-deprecation/)
|
||||||
project plans to stop publishing packages to the Google-hosted repository in the future.
|
for more details.
|
||||||
|
|
||||||
There are some important considerations for the Kubernetes package repositories:
|
|
||||||
|
|
||||||
- The Kubernetes package repositories contain packages beginning with those
|
|
||||||
Kubernetes versions that were still under support when the community took
|
|
||||||
over the package builds. This means that anything before v1.24.0 will only be
|
|
||||||
available in the Google-hosted repository.
|
|
||||||
- There's a dedicated package repository for each Kubernetes minor version.
|
|
||||||
When upgrading to a different minor release, you must bear in mind that
|
|
||||||
the package repository details also change.
|
|
||||||
|
|
||||||
{{< /note >}}
|
{{< /note >}}
|
||||||
|
|
||||||
{{< tabs name="k8s_install" >}}
|
{{< tabs name="k8s_install" >}}
|
||||||
{{% tab name="Debian-based distributions" %}}
|
{{% tab name="Debian-based distributions" %}}
|
||||||
|
|
||||||
### Kubernetes package repositories {#dpkg-k8s-package-repo}
|
|
||||||
|
|
||||||
These instructions are for Kubernetes {{< skew currentVersion >}}.
|
These instructions are for Kubernetes {{< skew currentVersion >}}.
|
||||||
|
|
||||||
1. Update the `apt` package index and install packages needed to use the Kubernetes `apt` repository:
|
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
|
||||||
you can create it by running `sudo mkdir -m 755 /etc/apt/keyrings`
|
you can create it by running `sudo mkdir -m 755 /etc/apt/keyrings`
|
||||||
{{< /note >}}
|
{{< /note >}}
|
||||||
|
|
||||||
### Google-hosted package repository (deprecated) {#dpkg-google-package-repo}
|
|
||||||
|
|
||||||
These instructions are for Kubernetes {{< skew currentVersion >}}.
|
|
||||||
|
|
||||||
1. Update the `apt` package index and install packages needed to use the Kubernetes `apt` repository:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo apt-get update
|
|
||||||
# apt-transport-https may be a dummy package; if so, you can skip that package
|
|
||||||
sudo apt-get install -y apt-transport-https ca-certificates curl
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Download the Google Cloud public signing key:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
curl -fsSL https://dl.k8s.io/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Add the Google-hosted `apt` repository:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# This overwrites any existing configuration in /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 the `apt` package index, install kubelet, kubeadm and kubectl, and pin their version:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo apt-get update
|
|
||||||
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 it by running `sudo mkdir -m 755 /etc/apt/keyrings`
|
|
||||||
{{< /note >}}
|
|
||||||
|
|
||||||
{{% /tab %}}
|
{{% /tab %}}
|
||||||
{{% tab name="Red Hat-based distributions" %}}
|
{{% tab name="Red Hat-based distributions" %}}
|
||||||
|
|
||||||
1. Set SELinux to `permissive` mode:
|
1. Set SELinux to `permissive` mode:
|
||||||
|
|
||||||
|
These instructions are for Kubernetes {{< skew currentVersion >}}.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# Set SELinux in permissive mode (effectively disabling it)
|
# Set SELinux in permissive mode (effectively disabling it)
|
||||||
sudo setenforce 0
|
sudo setenforce 0
|
||||||
|
@ -266,10 +217,6 @@ sudo sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
|
||||||
settings that are not supported by kubeadm.
|
settings that are not supported by kubeadm.
|
||||||
{{< /caution >}}
|
{{< /caution >}}
|
||||||
|
|
||||||
### Kubernetes package repositories {#rpm-k8s-package-repo}
|
|
||||||
|
|
||||||
These instructions are for Kubernetes {{< skew currentVersion >}}.
|
|
||||||
|
|
||||||
2. Add the Kubernetes `yum` repository. The `exclude` parameter in the
|
2. Add the Kubernetes `yum` repository. The `exclude` parameter in the
|
||||||
repository definition ensures that the packages related to Kubernetes are
|
repository definition ensures that the packages related to Kubernetes are
|
||||||
not upgraded upon running `yum update` as there's a special procedure that
|
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
|
||||||
sudo systemctl enable --now kubelet
|
sudo systemctl enable --now kubelet
|
||||||
```
|
```
|
||||||
|
|
||||||
### Google-hosted package repository (deprecated) {#rpm-google-package-repo}
|
|
||||||
|
|
||||||
These instructions are for Kubernetes {{< skew currentVersion >}}.
|
|
||||||
|
|
||||||
2. Add the Google-hosted `yum` repository. The `exclude` parameter in the
|
|
||||||
repository definition ensures that the packages related to Kubernetes are
|
|
||||||
not upgraded upon running `yum update` as there's a special procedure that
|
|
||||||
must be followed for upgrading Kubernetes.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# This overwrites any existing configuration in /etc/yum.repos.d/kubernetes.repo
|
|
||||||
cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
|
|
||||||
[kubernetes]
|
|
||||||
name=Kubernetes
|
|
||||||
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-\$basearch
|
|
||||||
enabled=1
|
|
||||||
gpgcheck=1
|
|
||||||
gpgkey=https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
|
|
||||||
exclude=kubelet kubeadm kubectl
|
|
||||||
EOF
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Install kubelet, kubeadm and kubectl, and enable kubelet to ensure it's automatically started on startup:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
|
|
||||||
sudo systemctl enable --now kubelet
|
|
||||||
```
|
|
||||||
|
|
||||||
{{< note >}}
|
|
||||||
If the `baseurl` fails because your RPM-based distribution cannot interpret `$basearch`, replace `\$basearch` with your computer's architecture.
|
|
||||||
Type `uname -m` to see that value.
|
|
||||||
For example, the `baseurl` URL for `x86_64` could be: `https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64`.
|
|
||||||
{{< /note >}}
|
|
||||||
|
|
||||||
{{% /tab %}}
|
{{% /tab %}}
|
||||||
{{% tab name="Without a package manager" %}}
|
{{% tab name="Without a package manager" %}}
|
||||||
Install CNI plugins (required for most pod network):
|
Install CNI plugins (required for most pod network):
|
||||||
|
|
|
@ -6,21 +6,23 @@ weight: 120
|
||||||
|
|
||||||
<!-- overview -->
|
<!-- overview -->
|
||||||
|
|
||||||
This page explains how to switch from one Kubernetes package repository to another
|
This page explains how to enable a package repository for a new Kubernetes minor release
|
||||||
when upgrading Kubernetes minor releases. Unlike deprecated Google-hosted
|
for users of the community-owned package repositories hosted at `pkgs.k8s.io`.
|
||||||
repositories, the Kubernetes package repositories are structured in a way that
|
Unlike the legacy package repositories, the community-owned package repositories are
|
||||||
there's a dedicated package repository for each Kubernetes minor version.
|
structured in a way that there's a dedicated package repository for each Kubernetes
|
||||||
|
minor version.
|
||||||
|
|
||||||
## {{% heading "prerequisites" %}}
|
## {{% heading "prerequisites" %}}
|
||||||
|
|
||||||
This document assumes that you're already using the Kubernetes community-owned
|
This document assumes that you're already using the community-owned
|
||||||
package repositories. If that's not the case, it's strongly recommended to migrate
|
package repositories (`pkgs.k8s.io`). If that's not the case, it's strongly
|
||||||
to the Kubernetes package repositories.
|
recommended to migrate to the community-owned package repositories as described
|
||||||
|
in the [official announcement](/blog/2023/08/15/pkgs-k8s-io-introduction/).
|
||||||
|
|
||||||
### Verifying if the Kubernetes package repositories are used
|
### Verifying if the Kubernetes package repositories are used
|
||||||
|
|
||||||
If you're unsure whether you're using the Kubernetes package repositories or the
|
If you're unsure whether you're using the community-owned package repositories or the
|
||||||
Google-hosted repository, take the following steps to verify:
|
legacy package repositories, take the following steps to verify:
|
||||||
|
|
||||||
{{< tabs name="k8s_install_versions" >}}
|
{{< tabs name="k8s_install_versions" >}}
|
||||||
{{% tab name="Ubuntu, Debian or HypriotOS" %}}
|
{{% tab name="Ubuntu, Debian or HypriotOS" %}}
|
||||||
|
@ -39,7 +41,8 @@ deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io
|
||||||
```
|
```
|
||||||
|
|
||||||
**You're using the Kubernetes package repositories and this guide applies to you.**
|
**You're using the Kubernetes package repositories and this guide applies to you.**
|
||||||
Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories.
|
Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories
|
||||||
|
as described in the [official announcement](/blog/2023/08/15/pkgs-k8s-io-introduction/).
|
||||||
|
|
||||||
{{% /tab %}}
|
{{% /tab %}}
|
||||||
{{% tab name="CentOS, RHEL or Fedora" %}}
|
{{% tab name="CentOS, RHEL or Fedora" %}}
|
||||||
|
@ -64,7 +67,8 @@ exclude=kubelet kubeadm kubectl
|
||||||
```
|
```
|
||||||
|
|
||||||
**You're using the Kubernetes package repositories and this guide applies to you.**
|
**You're using the Kubernetes package repositories and this guide applies to you.**
|
||||||
Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories.
|
Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories
|
||||||
|
as described in the [official announcement](/blog/2023/08/15/pkgs-k8s-io-introduction/).
|
||||||
|
|
||||||
{{% /tab %}}
|
{{% /tab %}}
|
||||||
|
|
||||||
|
@ -90,7 +94,8 @@ exclude=kubelet kubeadm kubectl
|
||||||
```
|
```
|
||||||
|
|
||||||
**You're using the Kubernetes package repositories and this guide applies to you.**
|
**You're using the Kubernetes package repositories and this guide applies to you.**
|
||||||
Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories.
|
Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories
|
||||||
|
as described in the [official announcement](/blog/2023/08/15/pkgs-k8s-io-introduction/).
|
||||||
|
|
||||||
{{% /tab %}}
|
{{% /tab %}}
|
||||||
{{< /tabs >}}
|
{{< /tabs >}}
|
||||||
|
|
|
@ -54,9 +54,9 @@ The upgrade workflow at high level is the following:
|
||||||
|
|
||||||
## Changing the package repository
|
## Changing the package repository
|
||||||
|
|
||||||
If you're using the Kubernetes community-owned repositories, you need to change
|
If you're using the community-owned package repositories (`pkgs.k8s.io`), you need to
|
||||||
the package repository to one that contains packages for your desired Kubernetes
|
enable the package repository for the desired Kubernetes minor release. This is explained in
|
||||||
minor version. This is explained in [Changing the Kubernetes package repository](/docs/tasks/administer-cluster/kubeadm/change-package-repository/)
|
[Changing the Kubernetes package repository](/docs/tasks/administer-cluster/kubeadm/change-package-repository/)
|
||||||
document.
|
document.
|
||||||
|
|
||||||
## Determine which version to upgrade to
|
## Determine which version to upgrade to
|
||||||
|
|
|
@ -19,9 +19,9 @@ upgrade the control plane nodes before upgrading your Linux Worker nodes.
|
||||||
|
|
||||||
## Changing the package repository
|
## Changing the package repository
|
||||||
|
|
||||||
If you're using the Kubernetes community-owned repositories, you need to change
|
If you're using the community-owned package repositories (`pkgs.k8s.io`), you need to
|
||||||
the package repository to one that contains packages for your desired Kubernetes
|
enable the package repository for the desired Kubernetes minor release. This is explained in
|
||||||
minor version. This is explained in [Changing the Kubernetes package repository](/docs/tasks/administer-cluster/kubeadm/change-package-repository/)
|
[Changing the Kubernetes package repository](/docs/tasks/administer-cluster/kubeadm/change-package-repository/)
|
||||||
document.
|
document.
|
||||||
|
|
||||||
## Upgrading worker nodes
|
## Upgrading worker nodes
|
||||||
|
|
Loading…
Reference in New Issue