corneliusweig / kubernetes-lxd

A step-by-step guide to get kubernetes running inside an LXC container
295 stars 52 forks source link

No mention of swap settings #9

Open rask opened 4 years ago

rask commented 4 years ago

I'm following this for learning purposes. All is well until the first kubeadm command. I am receiving preflight errors regarding memory and swap:

[ERROR Swap]: running with swap on is not supported. Please disable swap 

Maybe add a note about this in the guide? And any pointers on how to go around this "properly"?

LXD is version 4.0 and Kubernetes is at 1.18.1.

corneliusweig commented 4 years ago

Thanks for reporting. Would you care to send a PR?

I haven't encountered this problem so I have no proper workaround, sorry. But if you find out more, I'm eager to know.

rask commented 4 years ago

You can disable swap for Kubelet in Kubelet configs. And during kubeadm run you must disable the Swap preflight check in order to allow init to work. Will add these in a PR for those who want to run with swap enabled.