Centos7下使用二进制部署k8s高可用集群

master1 安装组件
kube-apiserver,kube-controller-manager,kube-scheduler,etcd
node安装组件
kubelet,kube-proxy,docker etcd


一、操作系统初始化配置
# 关闭防火墙
systemctl stop firewalld
systemctl disable firewalld

# 关闭selinux
sed -i 's/enforcing/disabled/' /etc/selinux/config  # 永久
setenforce 0  # 临时

# 关闭swap
swapoff -a  # 临时
sed -ri 's/.*swap.*/#&/' /etc/fstab    # 永久

# 根据规划设置主机名
hostnamectl set-hostname

# 在master添加hosts
cat >> /etc/hosts << EOF
192.168.175.58 k8s-master1
192.168.175.59 k8s-master2
192.168.175.80 k8s-node1
192.168.175.81 k8s-node2
EOF

# 将桥接的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  # 生效

# 时间

你可能感兴趣的:(k8s,kubernetes,etcd)