Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use kubectl v1.30.5 because of the depracation of the gs://kubernetes-release #5369

Closed
ffjlabo opened this issue Nov 28, 2024 · 5 comments · Fixed by #5379
Closed

Can't use kubectl v1.30.5 because of the depracation of the gs://kubernetes-release #5369

ffjlabo opened this issue Nov 28, 2024 · 5 comments · Fixed by #5379
Labels
kind/bug Something isn't working

Comments

@ffjlabo
Copy link
Member

ffjlabo commented Nov 28, 2024

What happened:

The deployment failed when using kubectl v1.30.5.
It seems that the origin bucket is deprecated. ref: kubernetes/k8s.io#2396

Failed to apply manifest: name="xxx", kind="ConfigMap", namespace="default", apiVersion="v1" (%!w(*fmt.wrapError=&{failed to apply:  (fork/exec /home/piped/.piped/tools/kubectl-1.30.5: exec format error) 0xc011f0c270}))

kubernetes/k8s.io#2396

What you expected to happen:

How to reproduce it:

Environment:

  • piped version:
  • control-plane version:
  • Others:
@ffjlabo ffjlabo added the kind/bug Something isn't working label Nov 28, 2024
@khanhtc1202
Copy link
Member

Note: Update source of kubectl to the new bucket supported by k8s official
ref: https://github.com/pipe-cd/pipecd/blob/master/pkg/app/piped/toolregistry/tool_linux.go#L19C9-L19C61

Note: Also check other tool bucket

@ffjlabo
Copy link
Member Author

ffjlabo commented Nov 28, 2024

@ffjlabo
Copy link
Member Author

ffjlabo commented Nov 28, 2024

We should use https://dl.k8s.io/ instead of https://storage.googleapis.com/kubernetes-release.

ref: kubernetes/kubernetes#127796 (comment)

https://dl.k8s.io/ is the canonical release host, which is documented at:
https://kubernetes.io/releases/download/
The release note links for downloads: https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.31.md#downloads-for-v1311
https://www.downloadkubernetes.com/
That has been the case for a long time now, it just used to redirect to this google cloud storage bucket. It redirects to a CDN hosted by fastly for more than a year now. https://kubernetes.io/blog/2023/06/09/dl-adopt-cdn/

However that CDN used to be in front of that google.com GCP bucket, now in the latest releases that CDN is in front of a community owned private bucket (to avoid serving user traffic from a single region) instead of the old google.com internal GCP bucket, so releases are no longer possible to fetch from the old bucket which was a leaky implementation detail of dl.k8s.io.

You should avoid depending on the implementation details versus just HTTP(S) download from dl.k8s.io

@ffjlabo
Copy link
Member Author

ffjlabo commented Nov 28, 2024

@khanhtc1202
It affects two files because they use https://storage.googleapis.com/kubernetes-release.

Also, kustomize and helm are not affected.

  • kustomize is downloaded via github.com
  • helm is downloaded via get.helm.sh

@ffjlabo
Copy link
Member Author

ffjlabo commented Dec 3, 2024

Released it on the v0.50.0
https://github.com/pipe-cd/pipecd/releases/tag/v0.50.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants