Last updated on May 10th, 2024 at 08:52 am

While installing Kubernetes cluster 1.28 on my Ubuntu 20.04 server, I faced this error which says.

“The repository ‘ kubernetes-xenial Release’ does not have a Release file.”

Since Kubernetes has introduced community owned repositories the legacy google owned repos will no longer work. Google-hosted package repositories went away in January 2024

More details refer

Steps to resolve the issue

Step 1 : Run the command below, make sure to replace 1.28 with the Kubernetes version you are trying to install.

$ sudo curl -fsSL | sudo gpg --dearmor -o /usr/share/keyrings/kubernetes-apt-keyring.gpg

Step 2: Update the apt source list, don’t forget to replace 1.28 with the version of your choice.

$ sudo echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] /' | sudo tee /etc/apt/sources.list.d/kubernetes.list

Step 3: Now run

$ sudo apt update

Step 4: Install Kubernetes

$ sudo apt install -y kubeadm=1.28.1-1.1 kubelet=1.28.1-1.1 kubectl=1.28.1-1.1

Hope you got the issue fixed on your end. Let me know if you have any questions.

Leave a Reply

Your email address will not be published. Required fields are marked *