k8s高可用方案讲解和实操,“云原生”稳定性和扩展性更强的方案,但是这个方案不是最优的,还有更好的高可用方案,下面会详细介绍。2.架构3.开始部署1)节点信息hostnameIP角色local-168-182-110192.168.182.110masterlocal-168-182-111192.168.182.110nodelocal-168-182-112192.168.182.110nodelocal-168-182-113192.local。1613master-168-182-130192.168.182.130master2)前期准备(所有节点)1、配置hosts182.113local-168-182-113192.168.182.130local-168-182-1302,配置互信#直接回车保持即可按ssh-keygenssh-copy-id-i~/.ssh/id_rsa.pubroot@local-168-182-110ssh-copy-id-i~/.ssh/id_rsa.pubroot@local-168-182-111ssh-copy-id-i~/.ssh/id_rsa.pubroot@local-168-182-112ssh-copy-id-i~/.ssh/id_rsa.pubroot@local-168-182-113ssh-copy-id-i~/.ssh/id_rsa.pubroot@local-168-182-1303,时间同步yuminstallchrony-ysystemctlstartchronydsystemctlenablechronydsystemctlstatuschronydchronycsources4,关闭防火墙systemctlstopfirewalldsystemctldisablefirewalld5,禁用SELinux#暂时关闭setenforce0#永久disablesed-i's/^SELINUX=enforcing$/SELINUX=disabled/'/etc/selinux/config6,closeswap#暂时关闭;关闭swap主要是出于性能考虑swapoff-a#可以用这个命令查看swap是否关闭free#永久关闭sed-ri's/.*swap.*/#&/'/etc/fstab7,setbridge-nf-call-iptablescat<
