安装k8s 时报错No package kubelet-1.20.9 available.

报错信息:

[root@vm ~]# sudo yum install -y kubelet-1.20.9 kubeadm-1.20.9 kubectl-1.20.9 --disableexcludes=kubernetes
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • epel: mirror-icn.yuki.net.uk
    No package kubelet-1.20.9 available.
    No package kubeadm-1.20.9 available.
    No package kubectl-1.20.9 available.
    Error: Nothing to do

解决:

1.修改/etc/yum.repos.d/kubernetes.repo

[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-$basearch
enabled=1
gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg

2.重新加载云源

yum clean all && yum  makecache

3.再次安装

sudo yum install -y kubelet-1.20.9 kubeadm-1.20.9 kubectl-1.20.9 --disableexcludes=kubernetes
posted @ 2023-06-04 21:55  Cool_Yang  阅读(344)  评论(0编辑  收藏  举报