After a stand-alone issue kubenetes not start automatically shutdown

After a stand-alone issue kubenetes not start automatically shutdown

After the stand-alone version of the desktop version of Ubuntu and other k8s installed, reboot -a view with docker ps, you will find k8s containers are not started.

I checked, found mainly because the swap partition automatically opens after a reboot, you need to turn it off

First, in /etc/fstab, comment out the swap mount

# swap was on /dev/sdb6 during installation
#UUID=7db434f0-67e2-4077-9a72-a63271156676 none            swap    sw              0       0

Modify sysctl configuration, add a /etc/sysctl.d/k8s.conf

echo "vm.swappiness=0" > /etc/sysctl.d/k8s.conf

Close swap

swapoff -a

After closing the swap, with docker ps -avisible k8s cluster automatically started up.

Guess you like

Origin www.cnblogs.com/fengyc/p/12660380.html