I've installed k3s on Debian Bullseye (on M1 Pro through qemu/UTM).
k3s recommend to disable the swap. After reading the answers of the following questions:
I've :
- Disabled systemd swap service
sudo systemctl mask "dev-*.swap"
- Removed the swap partition in
/etc/fstab
. - Deleted the swap partition and extend the main partition to regain space
- Set the swapiness to 0 in
/etc/sysctl.conf
Now I have:
root@debian:~# systemctl --type swap --all
UNIT LOAD ACTIVE SUB DESCRIPTION
0 loaded units listed.
root@debian:~# sysctl vm.swappiness
vm.swappiness = 0
root@debian:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 1024M 0 rom
vda 254:0 0 10G 0 disk
├─vda1 254:1 0 512M 0 part /boot/efi
└─vda2 254:2 0 9.5G 0 part /
root@debian:~# free
total used free shared buff/cache available
Mem: 1000692 705588 34164 1704 260940 221484
Swap: 0 0 0
root@debian:~# swapon -s
root@debian:~#
But when I run k3s check-config
, I still have:
- swap: should be disabled
What should I do in order to fully disable the swap in the eyes of k3s?