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
docker:dind image, with docker, so I can preload my imagesAdditional context
Thanks for this great piece of software!
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.
One idea I've had is currently we have the directory
/var/lib/rancher/k3s/server/manifeststhat will automatically deploy any k8s manifests. We could do similar with a directory like/var/lib/rancher/k3s/agent/imagesthat 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
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 !
I'm using k3s for some development work where I'm often building images locally with docker build and want to test them in my cluster without needing to push/pull or registry involved. It's a bit of a hack to work in both macos and linux, and it runs k3s agent in --docker mode, but so far seems to work for my purposes. https://gist.github.com/pmahoney/29bd2563aa69a09c98bbd7d8193b6213
Most helpful comment
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