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

Support loading images into K3s #588

Open
imjasonh opened this issue Feb 9, 2022 · 4 comments
Open

Support loading images into K3s #588

imjasonh opened this issue Feb 9, 2022 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed lifecycle/frozen

Comments

@imjasonh
Copy link
Member

imjasonh commented Feb 9, 2022

Similar to how we load images into KinD with KO_DOCKER_REPO=kind.local, we should support loading images into Rancher Desktop / k3s, which uses containerd.

https://cwienczek.com/2020/06/import-images-to-k3s-without-docker-registry/ indicates that you can run:

sudo k3s ctr images import /home/ubuntu/test-app-v1.0.0.tar

The Slack user Romāns Potašovs who originally asked about this feature says you can also:

docker save my_app:latest | ctr -a /run/k3s/containerd/containerd.sock -n=k8s.io images import -

In which case, this should be fairly straightforward, either by piping that output into an exec.Command, or by figuring out what library we'd need to import to accomplish the same thing. Shelling out might be better for our dependency graph (same for KinD, honestly).

This needs more investigation. If you have experience with k3s, and are interested in helping here, let me know.

@kameshsampath
Copy link

@imjasonh - #665 has raw implementation for it, seem to work for both rancher-desktop and vanilla lima-vm.

Got some TODOs added to it, happy to work on them when you feel if the approach looks OK.

Sadly there are no mocks for lima-vm( may be I dont know ;)) so test cases are kind of missing.

@github-actions
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Keep fresh with the 'lifecycle/frozen' label.

@imjasonh
Copy link
Member Author

I still think this is worth doing, and #665 seems pretty close to being ready. Keeping this open in the meantime.

@kameshsampath
Copy link

kameshsampath commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed lifecycle/frozen
Projects
None yet
Development

No branches or pull requests

2 participants