解决failure: repodata/repomd.xml from kubernetes: [Errno 256] No more mirrors to try

failure: repodata/repomd.xml from kubernetes: [Errno 256] No more mirrors to try.
https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for kubernetes

Translation:
Failed: repodata/repomd. xml from kubernetes: [Errno 256] No more images to try.
https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/repodata/repomd.xml: [Errno-1] report. Unable to verify xml signature of kubernetes

When kubelet is installed, run the command:

yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes

The following prompts and errors appear:

One of the configured repositories failed (Kubernetes),
and yum doesn’t have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work “fix” this:

  1. Contact the upstream for the repository and get them to fix the problem.

  2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

  3. Run the command with the repository temporarily disabled
    yum --disablerepo=kubernetes …

  4. Disable the repository permanently, so yum won’t use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:
    yum-config-manager --disable kubernetes
    or
    subscription-manager repos --disable=kubernetes

  5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:

yum-config-manager --save --setopt=kubernetes.skip_if_unavailable=true
failure: repodata/repomd.xml from kubernetes: [Errno 256] No more mirrors to try.
https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/repodata/repomd.xml: [Errno -1] repomd.xml signature could not be verified for kubernetes

translate:

One of the configured repositories failed (Kubernetes),
and yum didn't have enough cached data to continue. At this point, the only
safe thing Yum can do is fail. There are several ways to solve this problem:

1. Contact the upstream repository and ask them to fix the issue.
2. Reconfigure baseurl/etc. For the repository, point to a working
upstream if you are using a newer
version of the distribution supported by the repository (and
packages from the previous release still work). 3. Run the command yum --disablerepo=kubernetes
with the repository temporarily disabled .
.
4. Permanently disable the repository, so yum won't use it by default. Yum
will then ignore the repository until you permanently enable it
again or use --enablerepo temporarily:
yum-config-manager --disable kubernetes
or
subscription-manager repos --disable=kubernetes

5. If the failing repository is not available, configure it to be skipped.
Note that yum will try to contact the repo. As it runs most commands,
it has to try and fail every time (so .yum will succeed very
slowly). If this is a very temporary problem, this is usually a good
compromise:
yum-config-manager --save --setopt=kubernetes.skip_if_unavailable=true

Failed: repodata/repomd. xml from kubernetes: [Errno 256] No more images to try.
https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/repodata/repomd.xml: [Errno-1] report. Unable to verify xml signature of kubernetes

Two solutions: The main reason for this problem is that there is a problem with Ali's domestic yum source. It should be that the file path has been changed or upgraded, or the original file does not exist; prompts provide 1-5 solutions.
At this time, only It is necessary to modify the gpgcheck and repo_gpgcheck parameters of /etc/yum.repos.d/kubernetes.repo, and change it to 0, see below:

cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
enabled=1
gpgcheck=0
repo_gpgcheck=0
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
exclude=kubelet kubeadm kubectl
EOF

In this way, run yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes again
to install kubelet.

Guess you like

Origin blog.csdn.net/helloworldchina/article/details/127392032