kubeadm+haproxy+keepalived部署高可用k8s集群-版本k8s1.20.4—详细文档
相关配套软件包网盘下载链接如下:
网盘地址: https://url28.ctfile.com/f/37115828-599516373-25f42e?p=4907
访问密码:4907
本人会经常更新运维相关技术文档,如有兴趣,可以关注我博客,欢迎互动分享
kubeadm初始化高可用k8s1.20.4集群
1.所有节点修改主机名和配置host解析
#cat /etc/hosts
192.168.27.128 m1
192.168.27.129 m2
192.168.27.130 m3
192.168.27.131 n1
2.所有节点做时间同步:
#ntpdate time.windows.com
3.所有节点关闭防火墙
#systemctl stop firewalld
#systemctl disable firewalld
4.所有节点关闭selinux
#sed -i ‘s/enforcing/disabled/’ /etc/selinux/config
#setenforce 0
5.所有节点关闭swap
#swapoff -a
#sed -i ‘/swap/s/^(.*)$/#\1/g’ /etc/fstab
6.所有节点配置将桥接的IPv4流量传递到iptables的链
#cat >/etc/sysctl.d/k8s.conf << EOF
net.bridge.bridge-nf-call-ip6tables =1
net.bridge.bridge-nf-call-iptables =1
EOF
#sysctl --system #刷新生效