@@ -149,29 +149,16 @@ For more information on version skews, see:
149
149
* Kubeadm-specific [ version skew policy] ( /docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#version-skew-policy )
150
150
151
151
{{< 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.
168
157
{{< /note >}}
169
158
170
159
{{< tabs name="k8s_install" >}}
171
160
{{% tab name="Debian-based distributions" %}}
172
161
173
- ### Kubernetes package repositories {#dpkg-k8s-package-repo}
174
-
175
162
These instructions are for Kubernetes {{< skew currentVersion >}}.
176
163
177
164
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
208
195
you can create it by running ` sudo mkdir -m 755 /etc/apt/keyrings `
209
196
{{< /note >}}
210
197
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
-
249
198
{{% /tab %}}
250
199
{{% tab name="Red Hat-based distributions" %}}
251
200
252
201
1 . Set SELinux to ` permissive ` mode:
253
202
203
+ These instructions are for Kubernetes {{< skew currentVersion >}}.
204
+
254
205
``` shell
255
206
# Set SELinux in permissive mode (effectively disabling it)
256
207
sudo setenforce 0
@@ -266,10 +217,6 @@ sudo sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
266
217
settings that are not supported by kubeadm.
267
218
{{< /caution >}}
268
219
269
- ### Kubernetes package repositories {#rpm-k8s-package-repo}
270
-
271
- These instructions are for Kubernetes {{< skew currentVersion >}}.
272
-
273
220
2 . Add the Kubernetes ` yum ` repository. The ` exclude ` parameter in the
274
221
repository definition ensures that the packages related to Kubernetes are
275
222
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
295
242
sudo systemctl enable --now kubelet
296
243
```
297
244
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
-
333
245
{{% /tab %}}
334
246
{{% tab name="Without a package manager" %}}
335
247
Install CNI plugins (required for most pod network):
0 commit comments