@@ -12,34 +12,37 @@ weight: 120
12
12
<!-- overview -->
13
13
14
14
<!--
15
- This page explains how to switch from one Kubernetes package repository to another
16
- when upgrading Kubernetes minor releases. Unlike deprecated Google-hosted
17
- repositories, the Kubernetes package repositories are structured in a way that
18
- there's a dedicated package repository for each Kubernetes minor version.
15
+ This page explains how to enable a package repository for a new Kubernetes minor release
16
+ for users of the community-owned package repositories hosted at `pkgs.k8s.io`.
17
+ Unlike the legacy package repositories, the community-owned package repositories are
18
+ structured in a way that there's a dedicated package repository for each Kubernetes
19
+ minor version.
19
20
-->
20
- 本文阐述如何在升级 Kubernetes 小版本时从一个软件包仓库切换到另一个。
21
- 与弃用的 Google 托管仓库不同, Kubernetes 软件包仓库的结构是每个 Kubernetes
22
- 小版本都有一个专门的软件包仓库。
21
+ 本文阐述如何为 ` pkgs.k8s.io ` 上托管的、社区自治的软件包仓库的用户,
22
+ 启用新的 Kubernetes 小版本的软件包仓库。与传统的软件包仓库不同,
23
+ 社区自治的软件包仓库所采用的结构为每个 Kubernetes 小版本都有一个专门的软件包仓库。
23
24
24
25
## {{% heading "prerequisites" %}}
25
26
26
27
<!--
27
- This document assumes that you're already using the Kubernetes community-owned
28
- package repositories. If that's not the case, it's strongly recommend to migrate
29
- to the Kubernetes package repositories.
28
+ This document assumes that you're already using the community-owned
29
+ package repositories (`pkgs.k8s.io`). If that's not the case, it's strongly
30
+ recommended to migrate to the community-owned package repositories as described
31
+ in the [official announcement](/blog/2023/08/15/pkgs-k8s-io-introduction/).
30
32
-->
31
- 本文假设你已经在使用 Kubernetes 社区所拥有的软件包仓库。
32
- 如果不是这种情况,强烈建议迁移到 Kubernetes 软件包仓库。
33
+ 本文假设你已经在使用社区自治的软件包仓库(` pkgs.k8s.io ` )。如果不是这种情况,
34
+ 强烈建议按照[ 官方公告] ( /zh-cn/blog/2023/08/15/pkgs-k8s-io-introduction/ ) 中所述,
35
+ 迁移到社区自治的软件包仓库。
33
36
34
37
<!--
35
38
### Verifying if the Kubernetes package repositories are used
36
39
37
- If you're unsure if you're using the Kubernetes package repositories or the
38
- Google-hosted repository , take the following steps to verify:
40
+ If you're unsure whether you're using the community-owned package repositories or the
41
+ legacy package repositories , take the following steps to verify:
39
42
-->
40
43
### 验证是否正在使用 Kubernetes 软件包仓库
41
44
42
- 如果你不确定自己是在使用 Kubernetes 软件包仓库还是在使用 Google 托管的仓库 ,
45
+ 如果你不确定自己是在使用社区自治的软件包仓库还是在使用老旧的软件包仓库 ,
43
46
可以执行以下步骤进行验证:
44
47
45
48
{{< tabs name="k8s_install_versions" >}}
@@ -70,10 +73,12 @@ deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io
70
73
71
74
<!--
72
75
**You're using the Kubernetes package repositories and this guide applies to you.**
73
- Otherwise, it's strongly recommend to migrate to the Kubernetes package repositories.
76
+ Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories
77
+ as described in the [official announcement](/blog/2023/08/15/pkgs-k8s-io-introduction/).
74
78
-->
75
79
** 你正在使用 Kubernetes 软件包仓库,本指南适用于你。**
76
- 否则,强烈建议迁移到 Kubernetes 软件包仓库。
80
+ 否则,强烈建议按照[ 官方公告] ( /zh-cn/blog/2023/08/15/pkgs-k8s-io-introduction/ ) 中所述,
81
+ 迁移到 Kubernetes 软件包仓库。
77
82
78
83
{{% /tab %}}
79
84
{{% tab name="CentOS、RHEL 或 Fedora" %}}
@@ -86,7 +91,7 @@ Print the contents of the file that defines the Kubernetes `yum` repository:
86
91
cat /etc/yum.repos.d/kubernetes.repo
87
92
```
88
93
89
- If you see `baseurl` similar to the `baseurl` in the output below:
94
+ If you see a `baseurl` similar to the `baseurl` in the output below:
90
95
-->
91
96
打印定义 Kubernetes ` yum ` 仓库的文件的内容:
92
97
@@ -109,10 +114,54 @@ exclude=kubelet kubeadm kubectl
109
114
110
115
<!--
111
116
**You're using the Kubernetes package repositories and this guide applies to you.**
112
- Otherwise, it's strongly recommend to migrate to the Kubernetes package repositories.
117
+ Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories
118
+ as described in the [official announcement](/blog/2023/08/15/pkgs-k8s-io-introduction/).
113
119
-->
114
120
** 你正在使用 Kubernetes 软件包仓库,本指南适用于你。**
115
- 否则,强烈建议迁移到 Kubernetes 软件包仓库。
121
+ 否则,强烈建议按照[ 官方公告] ( /zh-cn/blog/2023/08/15/pkgs-k8s-io-introduction/ ) 中所述,
122
+ 迁移到 Kubernetes 软件包仓库。
123
+
124
+ {{% /tab %}}
125
+
126
+ {{% tab name="openSUSE 或 SLES" %}}
127
+
128
+ <!--
129
+ Print the contents of the file that defines the Kubernetes `zypper` repository:
130
+
131
+ ```shell
132
+ # On your system, this configuration file could have a different name
133
+ cat /etc/zypp/repos.d/kubernetes.repo
134
+ ```
135
+
136
+ If you see a `baseurl` similar to the `baseurl` in the output below:
137
+ -->
138
+ 打印定义 Kubernetes ` zypper ` 仓库的文件的内容:
139
+
140
+ ``` shell
141
+ # 在你的系统上,此配置文件可能具有不同的名称
142
+ cat /etc/zypp/repos.d/kubernetes.repo
143
+ ```
144
+
145
+ 如果你看到的 ` baseurl ` 类似以下输出中的 ` baseurl ` :
146
+
147
+ ```
148
+ [kubernetes]
149
+ name=Kubernetes
150
+ baseurl=https://pkgs.k8s.io/core:/stable:/v{{< skew currentVersionAddMinor -1 "." >}}/rpm/
151
+ enabled=1
152
+ gpgcheck=1
153
+ gpgkey=https://pkgs.k8s.io/core:/stable:/v{{< skew currentVersionAddMinor -1 "." >}}/rpm/repodata/repomd.xml.key
154
+ exclude=kubelet kubeadm kubectl
155
+ ```
156
+
157
+ <!--
158
+ **You're using the Kubernetes package repositories and this guide applies to you.**
159
+ Otherwise, it's strongly recommended to migrate to the Kubernetes package repositories
160
+ as described in the [official announcement](/blog/2023/08/15/pkgs-k8s-io-introduction/).
161
+ -->
162
+ ** 你正在使用 Kubernetes 软件包仓库,本指南适用于你。**
163
+ 否则,强烈建议按照[ 官方公告] ( /zh-cn/blog/2023/08/15/pkgs-k8s-io-introduction/ ) 中所述,
164
+ 迁移到 Kubernetes 软件包仓库。
116
165
117
166
{{% /tab %}}
118
167
{{< /tabs >}}
@@ -167,7 +216,7 @@ version.
167
216
```
168
217
169
218
<!--
170
- 2 . Change the version in the URL to **the next available minor release**, for example:
219
+ 1 . Change the version in the URL to **the next available minor release**, for example:
171
220
-->
172
221
2 . 将 URL 中的版本更改为** 下一个可用的小版本** ,例如:
173
222
@@ -176,7 +225,7 @@ version.
176
225
```
177
226
178
227
<!--
179
- 3 . Save the file and exit your text editor. Continue following the relevant upgrade instructions.
228
+ 1 . Save the file and exit your text editor. Continue following the relevant upgrade instructions.
180
229
-->
181
230
3 . 保存文件并退出文本编辑器。继续按照相关的升级说明进行操作。
182
231
@@ -211,7 +260,7 @@ version.
211
260
```
212
261
213
262
<!--
214
- 2 . Change the version in these URLs to **the next available minor release**, for example:
263
+ 1 . Change the version in these URLs to **the next available minor release**, for example:
215
264
-->
216
265
2 . 将这些 URL 中的版本更改为** 下一个可用的小版本** ,例如:
217
266
@@ -226,7 +275,7 @@ version.
226
275
```
227
276
228
277
<!--
229
- 3 . Save the file and exit your text editor. Continue following the relevant upgrade instructions.
278
+ 1 . Save the file and exit your text editor. Continue following the relevant upgrade instructions.
230
279
-->
231
280
3 . 保存文件并退出文本编辑器。继续按照相关的升级说明进行操作。
232
281
0 commit comments