kubeadm-ansible
kubeadm-ansible copied to clipboard
ip forwarding getting disabled after swapiness was set
It may just be my machine, but I noticed that ip forwarding was getting set to 0 after swapiness was set to 0 in the playbook. Since forwarding was already set to 0 in the config file, the task that sets swapiness was reloading the /etc/sysctl.conf file so I added this line to keep forwarding enabled:
- { name: 'net.ipv4.ip_forward', value: '1' }
I believe forwarding is required for docker to work.
My ansible version is 2.4.3.0 and i was running ubuntu 16.04 with the latest patches...
adding a new value to the sysctl.conf file must reload the file?
I also noticed that installing docker turns forwarding on but not permanently via the sysctl.conf file (a reboot will turn forwarding back on when docker starts probably)