127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.203.100 master.example.com master 192.168.203.20 node1.example.com node1 192.168.203.30 node2.example.com node2 192.168.203.50 node3.example.com node3
master
[root@master ~]# vim /etc/chrony.conf local stratum 10 [root@master ~]# systemctl restart chronyd [root@master ~]# systemctl enable chronyd [root@master ~]# hwclock -w
node2 and 3
[root@node2 ~]# vim /etc/chrony.conf #pool 2.centos.pool.ntp.org iburst server master.example.com iburst [root@node2 ~]# systemctl restart chronyd [root@node2 ~]# systemctl enable chronyd [root@node2 ~]# hwclock -w [root@node3 ~]# vim /etc/chrony.conf #pool 2.centos.pool.ntp.org iburst server master.example.com iburst [root@node3 ~]# systemctl restart chronyd [root@node3 ~]# systemctl enable chronyd [root@node3 ~]# hwclock -w
systemctl stop firewalld systemctl disable firewalld vim /etc/selinux/conf SELINUX=disabled setenforce 0 systemctl stop postfix systemctl disabled postfix
vim /etc/fstab # /dev/mapper/cs-swap none swap defaults 0 0 swapoff -a 将swap行注释掉
master
[root@master ~]# vim /etc/sysctl.d/k8s.conf net.ipv4.ip_forward = 1 net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 [root@master ~]# modprobe br_netfilter [root@master ~]# sysctl -p /etc/sysctl.d/k8s.conf net.ipv4.ip_forward = 1 net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1
node2
[root@node2 ~]# vim /etc/sysctl.d/k8s.conf net.ipv4.ip_forward = 1 net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 [root@node2 ~]# modprobe br_netfilter [root@node2 ~]# sysctl -p /etc/sysctl.d/k8s.conf net.ipv4.ip_forward = 1 net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1
node3
[root@node3 ~]# vim /etc/sysctl.d/k8s.conf net.ipv4.ip_forward = 1 net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 [root@node3 ~]# modprobe br_netfilter [root@node3 ~]# sysctl -p /etc/sysctl.d/k8s.conf net.ipv4.ip_forward = 1 net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1
master
[root@master ~]# vim /etc/sysconfig/modules/ipvs.modules #!/bin/bash modprobe -- ip_vs modprobe -- ip_vs_rr modprobe -- ip_vs_wrr modprobe -- ip_vs_sh [root@master ~]# chmod +x /etc/sysconfig/modules/ipvs.modules [root@master ~]# bash /etc/sysconfig/modules/ipvs.modules [root@master ~]# lsmod | grep -e ip_vs ip_vs_sh 16384 0 ip_vs_wrr 16384 0 ip_vs_rr 16384 0 ip_vs 172032 6 ip_vs_rr,ip_vs_sh,ip_vs_wrr nf_conntrack 172032 2 nf_nat,ip_vs nf_defrag_ipv6 20480 2 nf_conntrack,ip_vs libcrc32c 16384 5 nf_conntrack,nf_nat,nf_tables,xfs,ip_vs [root@master ~]# reboot
标签:系统,安装,命令,方式,配置,QSL 来源:
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。