kubernetes / release

Release infrastructure for Kubernetes and related components
Apache License 2.0
487 stars 501 forks source link

Error encountered during installation using deprecated legacy Google-hosted repositories #3497

Open anu356 opened 7 months ago

anu356 commented 7 months ago

We are trying to use this " http://apt.kubernetes.io/" to install Kubernetes this URL is redirecting to https://packages.cloud.google.com/apt which is not working, we are not able to apt-get update and also not able to install Kubernetes , can any one help me to install Kubernetes.

curl https://packages.cloud.google.com/apt

<!DOCTYPE html>

Error 404 (Not Found)!!1

404. That’s an error.

That’s all we know. root@testing:/etc/PackageKit# ping https://packages.cloud.google.com/apt ping: https://packages.cloud.google.com/apt: Name or service not known root@testing:/etc/PackageKit# curl http://apt.kubernetes.io/ 302 Found

302 Found


nginx
k8s-ci-robot commented 7 months ago

This issue is currently awaiting triage.

SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
dipesh-rawat commented 7 months ago

/retitle Error encountered during installation using deprecated legacy Google-hosted repositories

dipesh-rawat commented 7 months ago

@anu356 As mentioned in the deprecation announcement here, the legacy Google-hosted repositories have been deprecated as of end of February 2024. We strongly recommend migrating to the new community-owned repositories. Detailed instructions on how to migrate can be found here.

dipesh-rawat commented 7 months ago

/kind support

anu356 commented 7 months ago

Thanks , we tried to install with ubuntu 20.4 version , k8s 1.28 version and cni 1.2.0 version but we got below error when installing , can we install k8s 1.28 in ubuntu 20.4 ?

The following packages have unmet dependencies: kubeadm : Depends: kubernetes-cni (>= 1.2.0) but it is not going to be installed kubelet : Depends: kubernetes-cni (>= 1.2.0) but it is not going to be installed E: Unable to correct problems, you have held broken packages.

neolit123 commented 7 months ago

/transfer release

neolit123 commented 7 months ago

but it is not going to be installed

does this work for you? https://askubuntu.com/a/606896

anu356 commented 7 months ago

apt get update is working with below cmds ,

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

curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.28/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg

sudo apt-get update

but we are not able to see k8s pods after installing with below cmd,

sudo apt-get install -y kubelet kubeadm kubectl

HammadZafarr commented 7 months ago

How to install old Kubernetes version?

Gives error on apt-get update

Err:1 https://prod-cdn.packages.k8s.io/repositories/isv:/kubernetes:/core:/stable:/v1.16/deb InRelease
403 Forbidden [IP: 99.86.91.121 443]

xmudrii commented 7 months ago

The new package repositories have packages for Kubernetes versions starting with v1.24.0. Please see this comment for more details and references https://github.com/kubernetes/release/issues/3497#issuecomment-1984024174

anu356 commented 7 months ago

we cant deploy old versions now , it is starting from V1.24 I have tried installing new Kubernetes version (1.28) pods got deployed ,

NAME READY STATUS RESTARTS AGE coredns-5dd5756b68-c2n74 1/1 Running 1 (5h2m ago) 24h coredns-5dd5756b68-gss7f 1/1 Running 1 (5h2m ago) 24h etcd-testing 1/1 Running 1 (5h2m ago) 24h kube-apiserver-testing 1/1 Running 2 (5h2m ago) 24h kube-controller-manager-testing 1/1 Running 14 (137m ago) 24h kube-proxy-qnmjv 1/1 Running 1 (5h2m ago) 24h kube-scheduler-testing 1/1 Running 14 (137m ago) 24h

HammadZafarr commented 7 months ago

Is there any workaround to work with old releases (< 1.24)?

xmudrii commented 7 months ago

One of the workarounds is to use binaries instead of packages for versions older than 1.24, see "Without a package manager" instructions on https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/ as an example

ulidtko commented 7 months ago

Hi @xmudrii, I also need kubectl >= 1.23 && < 1.24, and currently have it installed with apt from a .deb package from the deprecated apt.kubernetes.io repo.

I'm getting 403 Fobridden on both the new repo:

Err:9 https://prod-cdn.packages.k8s.io/repositories/isv:/kubernetes: kubernetes-jammy InRelease                                            
  403  Forbidden [IP: 2600:9000:26de:6000:16:f2ef:f640:93a1 443]

and even on its signing key:

curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.23/deb/Release.key curl: (22) The requested URL returned error: 403

I've read both the deprecation post (https://k8s.io/linuxrepos) & the announcement post for pkgs.k8s.io. Deprecation of older versions of kubectl itself is mentioned nowhere there.

Further, the announcement post claims:

The Google-hosted repository and all packages published to it will continue working in the same way as before.

— which is demonstrably false. I've had kubectl 1.23.17 install from apt.kubernetes.io just fine on 2024-02-02, here's apt log proving exactly that:

Start-Date: 2024-02-02 16:45:25 Requested-By: ulidtko (1000) Downgrade: kubectl:amd64 (1.28.2-00, 1.23.17-00) End-Date: 2024-02-02 16:45:28

and today, it gives 403. Which means that "will continue working in the same way as before" does not hold.

To conclude with the obvious question: is k8s Release SIG going to fix this?

xmudrii commented 7 months ago

As stated in the announcement blog post, the new package repositories host packages for Kubernetes versions starting with v1.24.0. Earlier Kubernetes versions are not available in the new package repositories. Those old Kubernetes versions have reached end-of-life long time before introducing the new package repositories and we don't provide support for them any longer. Alternatively, you can use binaries directly or build packages on your own.

The announcement blog post states the following at the beginning:

ℹ️ Update (January 12, 2024): the legacy Google-hosted repositories are going away in January 2024. Check out the deprecation announcement for more details about this change.

The legacy package repositories went away in February 2024, so you were still able to download packages from the legacy repositories on 2024-02-02.

As of your question, everything is stated in these two blog post. We might update some paragraphs to make it more clear and I'll look into that, but technically speaking, everything that you're seeing is expected and described in these blog posts.

xmudrii commented 7 months ago

Blog posts have been updated to make it clear that the legacy package repositories are gone. We still have to update the Kubernetes documentation to reflect this and I'm working on it. /assign

k8s-triage-robot commented 4 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

xmudrii commented 4 months ago

/remove-lifecycle stale

k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

ulidtko commented 1 month ago

/remove-lifecycle stale