Skip to content

Support loading images into K3s #588

Description

@imjasonh

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions