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

Allows to preload a docker image on the k3s node agents #92

Closed
dduportal opened this Issue Feb 28, 2019 · 3 comments

Comments

4 participants
@dduportal
Copy link

dduportal commented Feb 28, 2019

Is your feature request related to a problem? Please describe.

As a k3s end-user (with the docker-compose solution)
When I start a k3s cluster to test my application
Then I would want to be able to push the docker image of my application to each k3s's agent node,
that I've already built locally, and that I don't want to push to a remote registry for latency reasons.

Describe the solution you'd like

A k3s command to push an image from a tar file, and/or from a containerd/docker instance where k3s is running.

Describe alternatives you've considered

  • Running a local registry so my k3s pods would pull from this registry. But it's an additional layer with a lot of plumbing.
  • Currently, running k3s in a docker:dind image, with docker, so I can preload my images

Additional context

Thanks for this great piece of software!

@ibuildthecloud

This comment has been minimized.

Copy link
Member

ibuildthecloud commented Feb 28, 2019

One idea I've had is currently we have the directory /var/lib/rancher/k3s/server/manifests that will automatically deploy any k8s manifests. We could do similar with a directory like /var/lib/rancher/k3s/agent/images that will look for docker image archives (docker save format) and preload those into the agent on start.

@ibuildthecloud ibuildthecloud added this to Backlog in K3S Development Feb 28, 2019

@dduportal

This comment has been minimized.

Copy link
Author

dduportal commented Feb 28, 2019

One idea I've had is currently we have the directory /var/lib/rancher/k3s/server/manifests that will automatically deploy any k8s manifests. We could do similar with a directory like /var/lib/rancher/k3s/agent/images that will look for docker image archives (docker save format) and preload those into the agent on start.

This would be a real cool feature, and would totally solve the feature request!

For the reference, as I'm trying to replace kind by k3s, this is a feature provided by kind: https://kind.sigs.k8s.io/docs/design/node-image/#design (tar files present in /kind/images/ are loaded at node's startup).

Thanks for the quick feedback

@ibuildthecloud ibuildthecloud moved this from Backlog to In progress in K3S Development Mar 4, 2019

K3S Development automation moved this from In progress to Done Mar 5, 2019

@vdups

This comment has been minimized.

Copy link

vdups commented Mar 5, 2019

Hi,

That sounds cool !
Does that mean I would be able to preload some official docker images (eg: k8s.gcr.io/pause:3.1, coredns, traefik, klipper-helm, klipper-lb...) and then run my Kubernetes cluster in an airgap (ie without Internet connection, neither direct nor via a proxy) environment or in a very bandwidth constrained environment ?
Or should I post additional comments in issue #99 ?
It seems I could also overload some source code to use my private registry, but that would require to build k3s for each private registry.

Please note : With docker I know how to pull / save / load images, hower here with crictl I was only able to find pull command... not load. (seems an additional tool is needed : sudo ctr cri load pause.tar found here )

Thanks for your help !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.