techno-tim / k3s-ansible

The easiest way to bootstrap a self-hosted High Availability Kubernetes cluster. A fully automated HA k3s etcd install with kube-vip, MetalLB, and more. Build. Destroy. Repeat.
https://technotim.live/posts/k3s-etcd-ansible/
Apache License 2.0
2.41k stars 1.05k forks source link

Disable swap #266

Closed dberardo-com closed 1 year ago

dberardo-com commented 1 year ago

I assume that swap needs to be disabled during installation:

ref why: https://github.com/k3s-io/k3s-ansible/issues/147

ref how to: https://germaniumhq.com/2019/02/14/2019-02-14-Disabling-Swap-for-Kubernetes-in-an-Ansible-Playbook/

egandro commented 1 year ago

Don't mess with this in k3s-ansible.

I have a preflight.yml and do whatever it requires in there. e.g. swap, enable/disable ipv6, install nfs-common, LANG to C.UTF-8, install ntp and htpdate (for fixing the clock after a VM restore), install qemu-guest-agent,

So you see there is plenty to do - totaly legit - but it is 1000% out of the scope of k3s-ansible.

dberardo-com commented 1 year ago

is the preflight optional in the procedure? i wonder why the swap hasnt been disabled in my case, maybe that was skipped ? can that be run on a already existing cluster?

egandro commented 1 year ago

Preflight is my own file I created.... (preflight.yml).

egandro commented 1 year ago

Check this: https://pastebin.com/3XPzSQfT