1、描述:属于k8s初学者,由于国内好多加速器失效和其他网络原因,导致安装过程步履维艰,经过多次尝试,终于安装成功,记录一下供自己和大家参考。
2、环境:使用vmware workstation虚拟一台虚拟机,安装centos 7操作系统,可以访问公网。
3、关闭selinux,关闭防火墙
[root@localhost ~]# setenforce 0
[root@localhost ~]# sed -i "s/'Selinux=Enforcing'/'Selinux=disable'/g" /etc/selinux/config
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
3、删除默认镜像源并配置新的镜像源(此次使用阿里云镜像源)
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# rm -rf CentOS-Base.repo
[root@localhost yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
4、配置docker镜像源(此次使用阿里云镜像源)
[root@localhost yum.repos.d]# sudo yum install -y yum-utils
[root@localhost yum.repos.d]# yum-c