Created
September 6, 2019 14:19
-
-
Save oldarmyc/f06301f6b68dcb53c6a1b1c3495752c4 to your computer and use it in GitHub Desktop.
Shortened checks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MODULES="overlay br_netfilter ebtables iptable_nat iptable_filter" | |
echo "Enabling Modules" | |
for i in ${MODULES}; do echo "$i" | tee /etc/modules-load.d/$i.conf > /dev/null; done | |
for i in ${MODULES}; do sudo modprobe $i; done | |
lsmod | grep 'overlay\|br_netfilter\|ebtables' | |
echo "Disabling SELinux" | |
sudo setenforce 0 | |
sudo sed -i -- 's/SELINUX\=enforcing/SELINUX\=disabled/g' /etc/selinux/config | |
echo "Modifying Kernel Parameters" | |
sudo sysctl -w net.bridge.bridge-nf-call-ip6tables=1 | |
echo -e "net.bridge.bridge-nf-call-ip6tables = 1" > /etc/sysctl.d/10-net.bridge.bridge-nf-call-ip6tables.conf | |
sudo sysctl -w net.bridge.bridge-nf-call-iptables=1 | |
echo -e "net.bridge.bridge-nf-call-iptables = 1" > /etc/sysctl.d/10-net.bridge.bridge-nf-call-iptables.conf | |
sudo sysctl -w net.ipv4.ip_forward=1 | |
echo -e "net.ipv4.ip_forward = 1" > /etc/sysctl.d/10-net.ipv4.ip_forward.conf | |
sudo sysctl -w fs.may_detach_mounts=1 # https://gravitational.com/docs/faq/#kubernetes-pods-stuck-in-terminating-state | |
sudo echo -e "fs.may_detach_mounts = 1" > /etc/sysctl.d/10-fs.may_detach_mounts.conf | |
sudo sysctl -w fs.inotify.max_user_watches=1048576 | |
sudo echo -e "fs.inotify.max_user_watches = 1048576" > /etc/sysctl.d/10-fs.inotify.max_user_watches.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment