1. 添加 k8s 源

cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
exclude=kube*
EOF

2. 安装指定版本 k8s

$ yum install -y kubelet-1.14.2 --disableexcludes=kubernetes

3. 可用版本查看

    https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64/repodata/primary.xml

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐