Facing-challanges-for-installation-of-kubernest-cluster-setup-through-kubeadm-on-rhel8.9-vm. -- 404 for https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64/repodata/repomd.xml (IP: 142.250.115.139)

Asking for help? Comment out what you need so we can get more information to help you!

Cluster information

Kubernetes version:1.28.2
Cloud being used: VM bare-metal not on a public cloud)
Installation method: Onepremise
Host OS: RHEL8.9
CNI and version:
CRI and version:

After completing the below step, getting error.
cat < /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
EOF

error asbelow:

Errors during downloading metadata for repository ā€˜kubernetesā€™:

Error: Failed to download metadata for repo ā€˜kubernetesā€™: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Removed temporary configuration

Please let me know if any solution available.

Posted about this here:

I started getting this error recently on an existing installation, I didnt realise Google had retired the kubctl repository.

if installing new, just use step two below to use the k8s team repo instead of using the google repository. (see Install and Set Up kubectl on Linux | Kubernetes)

if anyone finds this, and like me already had kubectl installed, we just need to switch to use the newer repostitory and do an update

  1. sudo mv /etc/yum.repos.d/kubernetes.repo /etc/yum.repos.d/kubernetes.repo.backup
  2. sudo cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetes baseurl=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/ enabled=1 gpgcheck=1 gpgkey=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/repodata/repomd.xml.key EOF [kubernetes] name=Kubernetes baseurl=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/ enabled=1 gpgcheck=1 gpgkey=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/repodata/repomd.xml.key
  3. sudo dnf update kubectl

this will then replace any existing installation.

2 Likes