05. November 2019

How to set persistent swapoff for Kubernetes kubelet

When you first restart your Kubernetes node or master you usually bump into

failed to run Kubelet: running with swap on is not supported, please disable swap! or set --fail-swap-on 

Sounds quite obvious that the solution is in fact:

sudo swapoff -a

It is worth mentioning that swapoff command is not persistent on RaspberryPi, Ubuntu, etc. whereever systemd is having a go over reboots. To make it completely persistent just disable execution of the dphys-swapfile

sudo chmod -x /etc/init.d/dphys-swapfile

Newest from this category: