Skip to content

Commit 485097b

Browse files
committed
Clean up change-package-repository.md
1 parent 2c8dab6 commit 485097b

File tree

1 file changed

+50
-51
lines changed

1 file changed

+50
-51
lines changed

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

Lines changed: 50 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ there's a dedicated package repository for each Kubernetes minor version.
1414
## {{% heading "prerequisites" %}}
1515

1616
This document assumes that you're already using the Kubernetes community-owned
17-
package repositories. If that's not the case, it's strongly recommend to migrate
17+
package repositories. If that's not the case, it's strongly recommended to migrate
1818
to the Kubernetes package repositories.
1919

2020
### Verifying if the Kubernetes package repositories are used
2121

22-
If you're unsure if you're using the Kubernetes package repositories or the
22+
If you're unsure whether you're using the Kubernetes package repositories or the
2323
Google-hosted repository, take the following steps to verify:
2424

2525
{{< tabs name="k8s_install_versions" >}}
@@ -39,7 +39,7 @@ deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io
3939
```
4040

4141
**You're using the Kubernetes package repositories and this guide applies to you.**
42-
Otherwise, it's strongly recommend to migrate to the Kubernetes package repositories.
42+
Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories.
4343

4444
{{% /tab %}}
4545
{{% tab name="CentOS, RHEL or Fedora" %}}
@@ -51,7 +51,7 @@ Print the contents of the file that defines the Kubernetes `yum` repository:
5151
cat /etc/yum.repos.d/kubernetes.repo
5252
```
5353

54-
If you see `baseurl` similar to the `baseurl` in the output below:
54+
If you see a `baseurl` similar to the `baseurl` in the output below:
5555

5656
```
5757
[kubernetes]
@@ -64,7 +64,7 @@ exclude=kubelet kubeadm kubectl
6464
```
6565

6666
**You're using the Kubernetes package repositories and this guide applies to you.**
67-
Otherwise, it's strongly recommend to migrate to the Kubernetes package repositories.
67+
Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories.
6868

6969
{{% /tab %}}
7070
{{< /tabs >}}
@@ -76,7 +76,6 @@ it can also be one of:
7676
- `pkgs.k8s.io`
7777
- `pkgs.kubernetes.io`
7878
- `packages.kubernetes.io`
79-
- `packages.kubernetes.io`
8079
{{</ note >}}
8180

8281
<!-- steps -->
@@ -92,62 +91,62 @@ version.
9291

9392
1. Open the file that defines the Kubernetes `apt` repository using a text editor of your choice:
9493

95-
```shell
96-
nano /etc/apt/sources.list.d/kubernetes.list
97-
```
94+
```shell
95+
nano /etc/apt/sources.list.d/kubernetes.list
96+
```
9897

99-
You should see a single line with the URL that contains your current Kubernetes
100-
minor version. For example, if you're using v{{< skew currentVersionAddMinor -1 "." >}},
101-
you should see this:
98+
You should see a single line with the URL that contains your current Kubernetes
99+
minor version. For example, if you're using v{{< skew currentVersionAddMinor -1 "." >}},
100+
you should see this:
102101

103-
```
104-
deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v{{< skew currentVersionAddMinor -1 "." >}}/deb/ /
105-
```
102+
```
103+
deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v{{< skew currentVersionAddMinor -1 "." >}}/deb/ /
104+
```
106105

107-
2. Change the version in the URL to **the next available minor release**, for example:
106+
1. Change the version in the URL to **the next available minor release**, for example:
108107

109-
```
110-
deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/{{< param "version" >}}/deb/ /
111-
```
108+
```
109+
deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/{{< param "version" >}}/deb/ /
110+
```
112111

113-
3. Save the file and exit your text editor. Continue following the relevant upgrade instructions.
112+
1. Save the file and exit your text editor. Continue following the relevant upgrade instructions.
114113

115114
{{% /tab %}}
116115
{{% tab name="CentOS, RHEL or Fedora" %}}
117116

118117
1. Open the file that defines the Kubernetes `yum` repository using a text editor of your choice:
119118

120-
```shell
121-
nano /etc/yum.repos.d/kubernetes.repo
122-
```
123-
124-
You should see a file with two URLs that contain your current Kubernetes
125-
minor version. For example, if you're using v{{< skew currentVersionAddMinor -1 "." >}},
126-
you should see this:
127-
128-
```
129-
[kubernetes]
130-
name=Kubernetes
131-
baseurl=https://pkgs.k8s.io/core:/stable:/v{{< skew currentVersionAddMinor -1 "." >}}/rpm/
132-
enabled=1
133-
gpgcheck=1
134-
gpgkey=https://pkgs.k8s.io/core:/stable:/v{{< skew currentVersionAddMinor -1 "." >}}/rpm/repodata/repomd.xml.key
135-
exclude=kubelet kubeadm kubectl cri-tools kubernetes-cni
136-
```
137-
138-
2. Change the version in these URLs to **the next available minor release**, for example:
139-
140-
```
141-
[kubernetes]
142-
name=Kubernetes
143-
baseurl=https://pkgs.k8s.io/core:/stable:/v{{< param "version" >}}/rpm/
144-
enabled=1
145-
gpgcheck=1
146-
gpgkey=https://pkgs.k8s.io/core:/stable:/v{{< param "version" >}}/rpm/repodata/repomd.xml.key
147-
exclude=kubelet kubeadm kubectl cri-tools kubernetes-cni
148-
```
149-
150-
3. Save the file and exit your text editor. Continue following the relevant upgrade instructions.
119+
```shell
120+
nano /etc/yum.repos.d/kubernetes.repo
121+
```
122+
123+
You should see a file with two URLs that contain your current Kubernetes
124+
minor version. For example, if you're using v{{< skew currentVersionAddMinor -1 "." >}},
125+
you should see this:
126+
127+
```
128+
[kubernetes]
129+
name=Kubernetes
130+
baseurl=https://pkgs.k8s.io/core:/stable:/v{{< skew currentVersionAddMinor -1 "." >}}/rpm/
131+
enabled=1
132+
gpgcheck=1
133+
gpgkey=https://pkgs.k8s.io/core:/stable:/v{{< skew currentVersionAddMinor -1 "." >}}/rpm/repodata/repomd.xml.key
134+
exclude=kubelet kubeadm kubectl cri-tools kubernetes-cni
135+
```
136+
137+
1. Change the version in these URLs to **the next available minor release**, for example:
138+
139+
```
140+
[kubernetes]
141+
name=Kubernetes
142+
baseurl=https://pkgs.k8s.io/core:/stable:/v{{< param "version" >}}/rpm/
143+
enabled=1
144+
gpgcheck=1
145+
gpgkey=https://pkgs.k8s.io/core:/stable:/v{{< param "version" >}}/rpm/repodata/repomd.xml.key
146+
exclude=kubelet kubeadm kubectl cri-tools kubernetes-cni
147+
```
148+
149+
1. Save the file and exit your text editor. Continue following the relevant upgrade instructions.
151150

152151
{{% /tab %}}
153152
{{< /tabs >}}

0 commit comments

Comments
 (0)