Rancher安装环境准备

5.1.1、主机配置

5.1.1.1、配置要求

硬件需求根据Rancher部署的规模进行扩展。根据需求配置每个节点。

部署大小集群(个)节点(个)vCPU内存
不超过5最多504C16GB
不超过100最多5008C32GB
5.1.1.2、操作系统选择
  • Ubuntu 16.04(64位)
  • Centos/RedHat Linux 7.5+(64位)
  • RancherOS 1.3.0+(64位)
  • Windows Server 1803(64位)
5.1.1.3、Docker版本选择

支持的Docker版本

  • 1.12.6
  • 1.13.1
  • 17.03.2
  • 17.06 (for Windows)
5.1.1.4、主机名配置

因为K8S的规定,主机名只支持包含 - 和 .(中横线和点)两种特殊符号,并且主机名不能出现重复。

5.1.1.5、Hosts

配置每台主机的hosts(/etc/hosts),添加host_ip $hostname/etc/hosts文件中。

5.1.1.6、CentOS关闭selinux
sudo sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
5.1.1.7、关闭防火墙(可选)或者放行相应端口

对于刚刚接触Rancher的用户,建议在关闭防火墙的测试环境或桌面虚拟机来运行rancher,以避免出现网络通信问题。

  • 关闭防火墙
    1、CentOS
    systemctl stop firewalld.service && systemctl disable firewalld.service
    
    2、Ubuntu
    ufw disable
    
  • 端口放行
    端口放行请查看端口需求
5.1.1.8、配置主机时间、时区、系统语言
  • 查看时区
    date -R
    或者
    timedatectl
    
  • 修改时区
    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
    
  • 修改系统语言环境
    sudo echo 'LANG="en_US.UTF-8"' >> /etc/profile;source /etc/profile
    
  • 配置主机NTP时间同步
5.1.1.9、Kernel性能调优
【注意】: 数值根据实际环境自行配置
cat >> /etc/sysctl.conf<<EOF
net.ipv4.ip_forward=1
net.bridge.bridge-nf-call-iptables=1
net.ipv4.neigh.default.gc_thresh1=4096
net.ipv4.neigh.default.gc_thresh2=6144
net.ipv4.neigh.default.gc_thresh3=8192
EOF

最后执行保存配置

sysctl -p
5.1.1.10、内核模块

加载以下模块

modprobe br_netfilter
modprobe ip6_udp_tunnel
modprobe ip_set
modprobe ip_set_hash_ip
modprobe ip_set_hash_net
modprobe iptable_filter
modprobe iptable_nat
modprobe iptable_mangle
modprobe iptable_raw
modprobe nf_conntrack_netlink
modprobe nf_conntrack
modprobe nf_conntrack_ipv4
modprobe nf_defrag_ipv4
modprobe nf_nat
modprobe nf_nat_ipv4
modprobe nf_nat_masquerade_ipv4
modprobe nfnetlink
modprobe udp_tunnel
modprobe VETH
modprobe VXLAN
modprobe x_tables
modprobe xt_addrtype
modprobe xt_conntrack
modprobe xt_comment
modprobe xt_mark
modprobe xt_multiport
modprobe xt_nat
modprobe xt_recent
modprobe xt_set
modprobe xt_statistic
modprobe xt_tcpudp
5.1.1.11、ETCD集群容错表

建议在ETCD集群中使用奇数个成员,通过添加额外成员可以获得更高的失败容错。

集群大小MAJORITY失败容错
110
220
321
431
532
642
743
853
954

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值