kubernetes: Kubernetes packages.cloud.google.com repo sometimes returns 404
What happened:
- Add
deb https://apt.kubernetes.io/ kubernetes-xenial mainto /etc/apt/sources.list - Run an apt update
- 1/2 of the time an error occurs showing a 404 from
https://packages.cloud.google.com/apt/dists/kubernetes-xenial/main/binary-arm64/by-hash/SHA256/b7b1a18f5c904c827f404ea5d6be989d6132654e6e3854e398c266ed5fe1ad00 - Manually completing a curl of this URL results in either a list of packages, or a 404.
What you expected to happen:
URL not to 404 and apt update to succeed.
How to reproduce it (as minimally and precisely as possible):
Keep making requests to https://packages.cloud.google.com/apt/dists/kubernetes-xenial/main/binary-arm64/by-hash/SHA256/b7b1a18f5c904c827f404ea5d6be989d6132654e6e3854e398c266ed5fe1ad00
Anything else we need to know?:
I’ve attached the result of a verbose curl during a successful call and and an un-successful call: success.txt 404.txt
Environment:
- Kubernetes version (use
kubectl version): 1.20 - Cloud provider or hardware configuration: Bare Metal Ubuntu arm64
- OS (e.g:
cat /etc/os-release):
PRETTY_NAME="Debian GNU/Linux bullseye/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
-
Kernel (e.g.
uname -a): Linux penguin 5.4.74-10576-gb6cc41974db3 #1 SMP PREEMPT Sun Nov 8 15:08:12 PST 2020 x86_64 GNU/Linux -
Install tools: kubeadm
-
Network plugin and version (if this is a network-related bug): n/a
-
Others:
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 20 (8 by maintainers)
As a data point, I’m seeing this issue now; trying to resolve.
https://kubernetes.io/blog/2023/08/15/pkgs-k8s-io-introduction/
I saw the following today while executing sudo apt-add-repository “deb https😕/apt.kubernetes.io/ kubernetes-xenial main”
Hit:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu focal InRelease Hit:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu focal-updates InRelease Hit:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu focal-backports InRelease Hit:4 https://download.docker.com/linux/ubuntu focal InRelease Ign:5 https://packages.cloud.google.com/apt kubernetes-xenial InRelease Err:6 https://packages.cloud.google.com/apt kubernetes-xenial Release 404 Not Found [IP: 172.253.62.139 443] Hit:7 http://security.ubuntu.com/ubuntu focal-security InRelease Reading package lists… Done E: The repository ‘https://apt.kubernetes.io kubernetes-xenial Release’ does not have a Release file. N: Updating from such a repository can’t be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
Any help on how to fix this ?
Add the Kubernetes v1.29 repo
sudo apt install -y apt-transport-https ca-certificates curl sudo mkdir -p /etc/apt/keyrings curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key |
sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo “deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /” |
sudo tee /etc/apt/sources.list.d/kubernetes.list > /dev/null
Install kubelet, kubeadm, kubectl
sudo apt update sudo apt install -y kubelet kubeadm kubectl sudo apt-mark hold kubelet kubeadm kubectl
use this , work for me
@AnilKumar107 , @nmallar Please follow official document https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#installing-kubeadm-kubelet-and-kubectl i think it works for you
Yes, this is no longer where the project hosts releases, there are more details in https://github.com/kubernetes/release/issues/3485 and there were announcements + a banner on kubernetes.io and again in the release announcement(s) https://kubernetes.io/blog/2023/12/13/kubernetes-v1-29-release/#legacy-linux-package-repositories
Please see the current TLDR in https://github.com/kubernetes/release/issues/3485
Could this be the problem?
https://github.com/kubernetes/release/issues/3485