Kubernetes (k8s)离线YUM源制作
1、离线YUM源制作:(离线YUM包存放在/root/Kubernetes)
yum install -y yum-utils createrepo
mkdir -p /root/Kubernetes
yumdownloader kubernetes --resolve --destdir=/root/Kubernetes
yumdownloader etcd --resolve --destdir=/root/Kubernetes
yumdownloader flannel --resolve --destdir=/root/Kubernetes
yumdownloader ntp --resolve --destdir=/root/Kubernetes
cd /root/Kubernetes
createrepo ./
tar zcvf /root/Kubernetes.tar.gz /root/Kubernetes/*
2、分发压缩包,并解压后,配置repo文件
cat > /etc/yum.repos.d/k8s-package.repo <<EOF
[k8s-package]
name=k8s-package
baseurl=file:///root/Kubernetes
enable=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
EOF
yum repolist