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

Dockerize krane #814

Open
zedtux opened this issue Mar 10, 2021 · 8 comments
Open

Dockerize krane #814

zedtux opened this issue Mar 10, 2021 · 8 comments

Comments

@zedtux
Copy link

zedtux commented Mar 10, 2021

In order to make it even more easy to use (not wasting time and system with Ruby and gems to be installed), it would be great to have this tool in a Docker container.

@dturn
Copy link
Contributor

dturn commented Mar 18, 2021

I'm open to this assuming we've got the infrastructure to make this happen easily. By and chance do you have an example Dockerfile we could build?

@zedtux
Copy link
Author

zedtux commented Mar 18, 2021

I'm open to this assuming we've got the infrastructure to make this happen easily.

Maybe you're thinking of the pipeline? If that's the case, as you're using Github, GH Actions would do it otherwise there are plainly of free options out there.

By and chance do you have an example Dockerfile we could build?

Not yet but it shouldn't be that hard since krane is just a gem. I will give it a try and let you know.

@strowi
Copy link
Contributor

strowi commented Apr 5, 2021

If you're talking about being able to execute krane via docker run... (and not the pipeline-build) maybe this will help - https://github.com/strowi/deploy/.

We're using this as general "deploy"container for docker-compose + kubernetes, it definitely could be slimmed down if only krane is wanted. But it might help to get you started.;)
The main problem might be getting all the variables/config-files into the container...

@dturn
Copy link
Contributor

dturn commented Apr 6, 2021

After thinking about this more, I'm hesitant to actually build a container. kubectl is only supporting one version a head a one behind (https://kubernetes.io/docs/setup/release/version-skew-policy/#kubectl) which makes me think we'll never include a version that makes enough people happy.

I'm still happy to add an example Dockerfile to the documentation though.

@zedtux
Copy link
Author

zedtux commented Apr 7, 2021

Sorry @dturn I don't understand what's the issue here.

@strowi
Copy link
Contributor

strowi commented Apr 7, 2021

@dturn is right. The kubectl-version is (more or less) bound to the cluster-version. So having kubectl-v1.18 in the docker-image you could only support clusters with v1.18+v1.19. Same goes the other way around for deprecations.
With the linked deploy-image we are only supporting a handful of clusters we have control over, so this is not a problem. But "in the open" you will get a lot of trouble.

Workaround could be mounting kubectl from the host, or downloading it in an init-script (this can/will get you probably rate-limited at least).

@airhorns
Copy link
Contributor

airhorns commented Jun 5, 2021

Another option would be building plain old krane binaries using something like https://github.com/pmq20/ruby-packer or https://github.com/phusion/traveling-ruby . If it needs to collaborate with other elements from the system like kubectl and the kube config, seems like the best fit would be to make it a program! It is definitely annoying to have to install a whole system ruby just to run krane if you aren't using ruby for anything else.

@dudicoco
Copy link

I agree with @airhorns, krane should be available as a binary.

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

No branches or pull requests

5 participants