release icon indicating copy to clipboard operation
release copied to clipboard

Make it easy to install the latest release of `kubectl` Debian and RPM packages

Open Sharaf5 opened this issue 1 year ago • 13 comments

isnt there a way to install latest version rather than going through the same installation process for each new version many poeple like to be mostly up to date

this was a good workaround but it's not working now

kv=$( curl -L -s https://dl.k8s.io/release/stable.txt | cut -f1,2 -d'.' )
curl -fsSL https://pkgs.k8s.io/core:/stable:/$kv/deb/Release.key | sudo gpg --dearmor -o /usr/share/keyrings/kubernetes.gpg;
echo "deb [signed-by=/usr/share/keyrings/kubernetes.gpg] https://pkgs.k8s.io/core:/stable:/${kv}/deb/ /" | sudo tee /etc/apt/sources.list.d/kubernetes.list

but recently we need to delete the patch number from version ( b in semantic versioning vM.m.p-build )

cant you make an alise for latest version in these links

https://pkgs.k8s.io/core:/stable:/latest/deb/Release.key
https://pkgs.k8s.io/core:/stable:/latest/deb/

Sharaf5 avatar Dec 09 '24 20:12 Sharaf5

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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar Dec 09 '24 20:12 k8s-ci-robot

Page: https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/

mengjiao-liu avatar Dec 10 '24 01:12 mengjiao-liu

/sig cli /kind feature

/retitle Document commands to install latest release of kubectl

The changes you've asked for aren't a priority for Kubernetes @Sharaf5. Can you explain the user story that this enables for you?

sftim avatar Dec 10 '24 10:12 sftim

I'm just telling you that if you could add an alise for latest version so one could update latest version and key programmatically or via scripts, that would be more user friendly

Sharaf5 avatar Dec 10 '24 15:12 Sharaf5

/transfer kubernetes

Documentation is correct; this is feature request

sftim avatar Dec 10 '24 16:12 sftim

/retitle Make it easy to install latest release of kubectl via scripts

sftim avatar Dec 10 '24 16:12 sftim

/sig release

sftim avatar Dec 10 '24 16:12 sftim

cc @kubernetes/release-managers

I could imagine that we populate a latest project through krel when we have all information at hand during release build.

Other than that I don't see many ways for a simple alias, because we require the information what the latest stable is as outlined in the workaround (first comment).

saschagrunert avatar Dec 11 '24 04:12 saschagrunert

I wouldn't prioritize this work. The people writing scripts might have to write 5 lines rather than 2, but that's an outcome I think we can bear.

sftim avatar Dec 11 '24 10:12 sftim

I could imagine that we populate a latest project through krel when we have all information at hand during release build.

and the process but I thought making an aliese for url is easy to do anyway you how perioritize your work so I'm so grateful for your time to discus, so in case of you changed your minds :

there is two easy way to do that depending on your server (which I dont know) :

  1. If the server serves from files like php : just make a symbolic link that is updated so the server will find it if it support symbolic links
  2. I your server serves from a pre-defined routes python or node : a route could be built for latest and a copy of the latest version keys and data are there, or just a file or a db record containing the latest stable build number to redirect to, so one dont need to repeat installation process intirly during update

symbolic links / copied dirs and files / version file / db record : could be updated at the end of successful release

Of course you know your servers more than me and you know what to perioritize

Sharaf5 avatar Dec 11 '24 12:12 Sharaf5

This is actually a k/release issue, I'll transfer it there so we have a track of it. /transfer release

/triage accepted /remove-sig cli /lifecycle frozen

This can be done on the OBS side by using the aggregate function. We in fact use that quite extensively already, but krel doesn't support it so we're always doing it manually. This means we would first have to extend krel to support aggregating packages before we can tackle this issue.

Once that's done, we could have a project like pkgs.k8s.io/core:/latest:/cli-tools where we aggregate kubectl packages.

However, as other folks said, this is not a priority for us at the moment.

xmudrii avatar Jan 06 '25 13:01 xmudrii

/retitle Make it easy to install the latest release of kubectl Debian and RPM packages

xmudrii avatar Jan 06 '25 13:01 xmudrii

This would be much appreciated. On Ubuntu, https://snapcraft.io/kubectl is more convenient, but unofficial and out of date. https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/change-package-repository/#switching-to-another-kubernetes-package-repository is documented but presumes manual editing rather than a scripted command. My expectation for a package repository is that I can just use sudo apt update && sudo apt dist-upgrade to get the latest stable versions of everything.

As an aside, the versioning is confusing. Using https://pkgs.k8s.io/core:/stable:/v1.32/deb/ I get package version 1:505.0.0-0 (what is this?) which reports

Client Version: v1.30.8-dispatcher

that looks two minor versions too old, but only when there is no server; when there is (kind create cluster), it reports

Client Version: v1.32.0

as expected.

jglick avatar Jan 09 '25 15:01 jglick