基础环境部署
k8s 集群 ip 规划
master1: 172.16.110/24
node1: 172.16.120/24
设置主机名 master
hostnamectl set-hostname master
设置主机名 node
hostnamectl set-hostname node
关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
将 SELinux 设置为 permissive 模式
setenforce 0
sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
删除原有 repo 源
rm -rf /etc/yum.repos.d/*
配置阿里云 repo 源
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
yum install yum-utils -y
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum clean all && yum makecache