Uploaded from github, added FreeBSD VMs support
This commit is contained in:
22
vm_example_scripts/k8s/install_packages/02-allow-bridge-nf-traffic.sh
Executable file
22
vm_example_scripts/k8s/install_packages/02-allow-bridge-nf-traffic.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
# disable swap
|
||||
sudo swapoff -a
|
||||
|
||||
# keeps the swaf off during reboot
|
||||
(crontab -l 2>/dev/null; echo "@reboot /sbin/swapoff -a") | crontab - || true
|
||||
sudo apt-get update -y
|
||||
|
||||
cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf
|
||||
overlay
|
||||
br_netfilter
|
||||
EOF
|
||||
|
||||
sudo modprobe overlay
|
||||
sudo modprobe br_netfilter
|
||||
|
||||
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
|
||||
net.bridge.bridge-nf-call-ip6tables = 1
|
||||
net.bridge.bridge-nf-call-iptables = 1
|
||||
net.ipv4.ip_forward = 1
|
||||
EOF
|
||||
sudo sysctl --system
|
||||
Reference in New Issue
Block a user