Skip to content

Commit 49f81c3

Browse files
authored
Merge pull request #52027 from Rablet/main
Added examples for DNF5
2 parents bdac65a + fefe9b4 commit 49f81c3

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

content/en/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,14 @@ exist by default, and it should be created before the curl command.
309309
310310
3. Install kubelet, kubeadm and kubectl:
311311
312+
For systems with DNF:
312313
```shell
313314
sudo yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
314315
```
316+
For systems with DNF5:
317+
```shell
318+
sudo yum install -y kubelet kubeadm kubectl --setopt=disable_excludes=kubernetes
319+
```
315320
316321
4. (Optional) Enable the kubelet service before running kubeadm:
317322

content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,18 @@ sudo apt-cache madison kubeadm
104104
{{% /tab %}}
105105
{{% tab name="CentOS, RHEL or Fedora" %}}
106106

107+
For systems with DNF:
107108
```shell
108109
# Find the latest {{< skew currentVersion >}} version in the list.
109110
# It should look like {{< skew currentVersion >}}.x-*, where x is the latest patch.
110111
sudo yum list --showduplicates kubeadm --disableexcludes=kubernetes
111112
```
113+
For systems with DNF5:
114+
```shell
115+
# Find the latest {{< skew currentVersion >}} version in the list.
116+
# It should look like {{< skew currentVersion >}}.x-*, where x is the latest patch.
117+
sudo yum list --showduplicates kubeadm --setopt=disable_excludes=kubernetes
118+
```
112119

113120
{{% /tab %}}
114121
{{< /tabs >}}
@@ -139,10 +146,16 @@ Pick a control plane node that you wish to upgrade first. It must have the `/etc
139146
{{% /tab %}}
140147
{{% tab name="CentOS, RHEL or Fedora" %}}
141148

149+
For systems with DNF:
142150
```shell
143151
# replace x in {{< skew currentVersion >}}.x-* with the latest patch version
144152
sudo yum install -y kubeadm-'{{< skew currentVersion >}}.x-*' --disableexcludes=kubernetes
145153
```
154+
For systems with DNF5:
155+
```shell
156+
# replace x in {{< skew currentVersion >}}.x-* with the latest patch version
157+
sudo yum install -y kubeadm-'{{< skew currentVersion >}}.x-*' --setopt=disable_excludes=kubernetes
158+
```
146159

147160
{{% /tab %}}
148161
{{< /tabs >}}
@@ -243,10 +256,16 @@ kubectl drain <node-to-drain> --ignore-daemonsets
243256
{{% /tab %}}
244257
{{% tab name="CentOS, RHEL or Fedora" %}}
245258

259+
For systems with DNF:
246260
```shell
247261
# replace x in {{< skew currentVersion >}}.x-* with the latest patch version
248262
sudo yum install -y kubelet-'{{< skew currentVersion >}}.x-*' kubectl-'{{< skew currentVersion >}}.x-*' --disableexcludes=kubernetes
249263
```
264+
For systems with DNF5:
265+
```shell
266+
# replace x in {{< skew currentVersion >}}.x-* with the latest patch version
267+
sudo yum install -y kubelet-'{{< skew currentVersion >}}.x-*' kubectl-'{{< skew currentVersion >}}.x-*' --setopt=disable_excludes=kubernetes
268+
```
250269

251270
{{% /tab %}}
252271
{{< /tabs >}}

content/en/docs/tasks/administer-cluster/kubeadm/upgrading-linux-nodes.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,16 @@ sudo apt-mark hold kubeadm
4242
```
4343
{{% /tab %}}
4444
{{% tab name="CentOS, RHEL or Fedora" %}}
45+
For systems with DNF:
4546
```shell
4647
# replace x in {{< skew currentVersion >}}.x-* with the latest patch version
4748
sudo yum install -y kubeadm-'{{< skew currentVersion >}}.x-*' --disableexcludes=kubernetes
4849
```
50+
For systems with DNF5:
51+
```shell
52+
# replace x in {{< skew currentVersion >}}.x-* with the latest patch version
53+
sudo yum install -y kubeadm-'{{< skew currentVersion >}}.x-*' --setopt=disable_excludes=kubernetes
54+
```
4955
{{% /tab %}}
5056
{{< /tabs >}}
5157

@@ -81,10 +87,16 @@ kubectl drain <node-to-drain> --ignore-daemonsets
8187
```
8288
{{% /tab %}}
8389
{{% tab name="CentOS, RHEL or Fedora" %}}
90+
For systems with DNF:
8491
```shell
8592
# replace x in {{< skew currentVersion >}}.x-* with the latest patch version
8693
sudo yum install -y kubelet-'{{< skew currentVersion >}}.x-*' kubectl-'{{< skew currentVersion >}}.x-*' --disableexcludes=kubernetes
8794
```
95+
For systems with DNF5:
96+
```shell
97+
# replace x in {{< skew currentVersion >}}.x-* with the latest patch version
98+
sudo yum install -y kubelet-'{{< skew currentVersion >}}.x-*' kubectl-'{{< skew currentVersion >}}.x-*' --setopt=disable_excludes=kubernetes
99+
```
88100
{{% /tab %}}
89101
{{< /tabs >}}
90102

0 commit comments

Comments
 (0)