环境准备
1.关闭防火墙,关闭selinux(生产环境按需关闭或打开)
systemctl disable firewalld.service
systemctl stop firewalld.service
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
检查:
systemctl is-enabled firewalld.service
systemctl status firewalld.service
getenforce
2.同步服务器时间,选择公网ntpd服务器或者自建ntpd服务器
3.关闭swap分区
echo "vm.swappiness=1">>/etc/sysctl.conf
sysctl -p
**检查:**
sysctl -a|grep "vm.swappiness"
4.集群所有节点主机可以相互解析
5.master对node节点ssh互信
ssh-keygen -t rsa
ssh-copy-id -i /root/.ssh/id_rsa.pub 172.16.0.95
6.配置系统内核参数使流过网桥的流量也进入iptables/netfilter框架
modprobe br_netfilter
echo -e 'net.bridge.bridge-nf-call-iptables = 1 \nnet.bridge.bridge-nf-call-ip6tables = 1' >>