From 0d9289bb40536f7b894d8c5649d4e80d78844904 Mon Sep 17 00:00:00 2001 From: Itamar Holder Date: Wed, 28 Aug 2024 11:41:17 +0300 Subject: [PATCH] Update instructions to disable or tolerate swap Signed-off-by: Itamar Holder --- .../tools/kubeadm/install-kubeadm.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/content/en/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md b/content/en/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md index 8ca7fe20d8291..60c293953d3f1 100644 --- a/content/en/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md +++ b/content/en/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md @@ -27,9 +27,13 @@ see the [Creating a cluster with kubeadm](/docs/setup/production-environment/too * Unique hostname, MAC address, and product_uuid for every node. See [here](#verify-mac-address) for more details. * Certain ports are open on your machines. See [here](#check-required-ports) for more details. * Swap configuration: The default behavior of a kubelet is to fail to start if swap memory is detected on a node. - See [Swap memory management](/docs/concepts/architecture/nodes/#swap-memory) for more details. - * You **MUST** disable swap if the kubelet is not properly configured to use swap. For example, `sudo swapoff -a` - will disable swapping temporarily. To make this change persistent across reboots, make sure swap is disabled in + This means that swap should either be disabled or tolerated by kubelet. + * To tolerate swap, add `failSwapOn: false` to kubelet configuration or as a command line argument. + Note: even if `failSwapOn: false` is provided, workloads wouldn't have swap access by default. + This can be changed by setting a `swapBehavior` that's different than `NoSwap` (which is the default). + See [Swap memory management](/docs/concepts/architecture/nodes/#swap-memory) for more details. + * To disable swap, `sudo swapoff -a` can be used to disable swapping temporarily. + To make this change persistent across reboots, make sure swap is disabled in config files like `/etc/fstab`, `systemd.swap`, depending how it was configured on your system. {{< note >}}