Support loading images into K3s
- Dominant language
- Go
- Stars
- 8.5k
- Forks
- 447
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
Research direction
Start by locating the existing KinD image-loading path and compare its behavior with the k3s/containerd commands described in the issue. Investigate whether shelling out or a library fits the project, then verify that images can be imported into Rancher Desktop/k3s without requiring a registry.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100