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

fix kubectl url and fail build on download errors #2994

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

winstona
Copy link
Contributor

looking at the latest build of this docker image, I'm seeing failures on kubectl:

$ docker pull derailed/k9s
Using default tag: latest
latest: Pulling from derailed/k9s
da9db072f522: Already exists 
908ff4b574ff: Pull complete 
b44627110f63: Pull complete 
Digest: sha256:502554a094cd1e845033485f49f71458c5a1d4318b3af1263a67ec6afe9159e8
Status: Downloaded newer image for derailed/k9s:latest
docker.io/derailed/k9s:latest
$ docker run -it --rm --entrypoint=/bin/sh derailed/k9s
/ # cat $(which kubectl)
<?xml version='1.0' encoding='UTF-8'?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Details>No such object: kubernetes-release/release/v1.31.2/bin/linux/amd64/kubectl</Details></Error>/ # 
/ # 

This fix should cause the image build to fail if the curl is unsuccessful (adds -f) and updates the URL based on the recommended location here: https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/

Copy link
Owner

@derailed derailed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@winstona Nice catch! Thank you!!

@derailed derailed merged commit 2932eb6 into derailed:master Nov 28, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants