Merge pull request #42753 from windsonsea/charepo

Clean up change-package-repository.md
pull/42776/head
Kubernetes Prow Robot 2023-08-29 00:55:22 -07:00 committed by GitHub
commit 3e36d0f0a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 45 additions and 46 deletions

View File

@ -14,12 +14,12 @@ there's a dedicated package repository for each Kubernetes minor version.
## {{% heading "prerequisites" %}}
This document assumes that you're already using the Kubernetes community-owned
package repositories. If that's not the case, it's strongly recommend to migrate
package repositories. If that's not the case, it's strongly recommended to migrate
to the Kubernetes package repositories.
### Verifying if the Kubernetes package repositories are used
If you're unsure if you're using the Kubernetes package repositories or the
If you're unsure whether you're using the Kubernetes package repositories or the
Google-hosted repository, take the following steps to verify:
{{< tabs name="k8s_install_versions" >}}
@ -39,7 +39,7 @@ 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.**
Otherwise, it's strongly recommend to migrate to the Kubernetes package repositories.
Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories.
{{% /tab %}}
{{% tab name="CentOS, RHEL or Fedora" %}}
@ -51,7 +51,7 @@ Print the contents of the file that defines the Kubernetes `yum` repository:
cat /etc/yum.repos.d/kubernetes.repo
```
If you see `baseurl` similar to the `baseurl` in the output below:
If you see a `baseurl` similar to the `baseurl` in the output below:
```
[kubernetes]
@ -64,7 +64,7 @@ exclude=kubelet kubeadm kubectl
```
**You're using the Kubernetes package repositories and this guide applies to you.**
Otherwise, it's strongly recommend to migrate to the Kubernetes package repositories.
Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories.
{{% /tab %}}
{{< /tabs >}}
@ -76,7 +76,6 @@ it can also be one of:
- `pkgs.k8s.io`
- `pkgs.kubernetes.io`
- `packages.kubernetes.io`
- `packages.kubernetes.io`
{{</ note >}}
<!-- steps -->
@ -92,62 +91,62 @@ version.
1. Open the file that defines the Kubernetes `apt` repository using a text editor of your choice:
```shell
nano /etc/apt/sources.list.d/kubernetes.list
```
```shell
nano /etc/apt/sources.list.d/kubernetes.list
```
You should see a single line with the URL that contains your current Kubernetes
minor version. For example, if you're using v{{< skew currentVersionAddMinor -1 "." >}},
you should see this:
You should see a single line with the URL that contains your current Kubernetes
minor version. For example, if you're using v{{< skew currentVersionAddMinor -1 "." >}},
you should see this:
```
deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v{{< skew currentVersionAddMinor -1 "." >}}/deb/ /
```
```
deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v{{< skew currentVersionAddMinor -1 "." >}}/deb/ /
```
2. Change the version in the URL to **the next available minor release**, for example:
1. Change the version in the URL to **the next available minor release**, for example:
```
deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/{{< param "version" >}}/deb/ /
```
```
deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/{{< param "version" >}}/deb/ /
```
3. Save the file and exit your text editor. Continue following the relevant upgrade instructions.
1. Save the file and exit your text editor. Continue following the relevant upgrade instructions.
{{% /tab %}}
{{% tab name="CentOS, RHEL or Fedora" %}}
1. Open the file that defines the Kubernetes `yum` repository using a text editor of your choice:
```shell
nano /etc/yum.repos.d/kubernetes.repo
```
```shell
nano /etc/yum.repos.d/kubernetes.repo
```
You should see a file with two URLs that contain your current Kubernetes
minor version. For example, if you're using v{{< skew currentVersionAddMinor -1 "." >}},
you should see this:
You should see a file with two URLs that contain your current Kubernetes
minor version. For example, if you're using v{{< skew currentVersionAddMinor -1 "." >}},
you should see this:
```
[kubernetes]
name=Kubernetes
baseurl=https://pkgs.k8s.io/core:/stable:/v{{< skew currentVersionAddMinor -1 "." >}}/rpm/
enabled=1
gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v{{< skew currentVersionAddMinor -1 "." >}}/rpm/repodata/repomd.xml.key
exclude=kubelet kubeadm kubectl cri-tools kubernetes-cni
```
```
[kubernetes]
name=Kubernetes
baseurl=https://pkgs.k8s.io/core:/stable:/v{{< skew currentVersionAddMinor -1 "." >}}/rpm/
enabled=1
gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v{{< skew currentVersionAddMinor -1 "." >}}/rpm/repodata/repomd.xml.key
exclude=kubelet kubeadm kubectl cri-tools kubernetes-cni
```
2. Change the version in these URLs to **the next available minor release**, for example:
1. Change the version in these URLs to **the next available minor release**, for example:
```
[kubernetes]
name=Kubernetes
baseurl=https://pkgs.k8s.io/core:/stable:/v{{< param "version" >}}/rpm/
enabled=1
gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v{{< param "version" >}}/rpm/repodata/repomd.xml.key
exclude=kubelet kubeadm kubectl cri-tools kubernetes-cni
```
```
[kubernetes]
name=Kubernetes
baseurl=https://pkgs.k8s.io/core:/stable:/v{{< param "version" >}}/rpm/
enabled=1
gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v{{< param "version" >}}/rpm/repodata/repomd.xml.key
exclude=kubelet kubeadm kubectl cri-tools kubernetes-cni
```
3. Save the file and exit your text editor. Continue following the relevant upgrade instructions.
1. Save the file and exit your text editor. Continue following the relevant upgrade instructions.
{{% /tab %}}
{{< /tabs >}}