1.2
系统配置
设置时间同步
timedatectl set-timezone Asia/Shanghai
apt-get install ntpdate
ntpdate ntp.aliyun.com
禁用selinux
setenforce 0
sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
关闭swap
// 看swap有没有关闭
swapoff -a
sed -i 's/.*swap.*/#&/' /etc/fstab
free -m
# swap 为 0
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.ip_forward = 1
EOF
关闭防火墙
apt-get install iptables
ufw disable
sysctl --system