Last updated on March 8th, 2024 at 07:17 am

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

“The repository ‘https://apt.kubernetes.io 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 https://kubernetes.io/blog/2023/08/15/pkgs-k8s-io-introduction/

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 https://pkgs.k8s.io/core:/stable:/v1.28/deb/Release.key | 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] https://pkgs.k8s.io/core:/stable:/v1.28/deb/ /' | 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 *