-
Notifications
You must be signed in to change notification settings - Fork 717
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
/question
I installed the latest k3s using lima and trying to load images into it using nerdctl --namespace=k8s.io load , but when I use a tarball from stdin I get the following error
time="2022-03-18T05:10:56Z" level=fatal msg="unrecognized image format"
The command I used to for this
crane export docker.io/busybox - | lima nerdctl --namespace=k8s.io load
https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane_export.md
Additional Info
nerdctl version 0.17.1
limactl version 0.9.1
k3s is created using the following lima yaml
# Deploy kubernetes via k3s (which installs a bundled containerd).
# $ limactl start ./k3s.yaml
# $ limactl shell k3s sudo kubectl
#
# It can be accessed from the host by exporting the kubeconfig file;
# the ports are already forwarded automatically by lima:
#
# $ export KUBECONFIG=$PWD/kubeconfig.yaml
# $ limactl shell k3s sudo cat /etc/rancher/k3s/k3s.yaml >$KUBECONFIG
# $ kubectl get no
# NAME STATUS ROLES AGE VERSION
# lima-k3s Ready control-plane,master 69s v1.21.1+k3s1
#
# This example requires Lima v0.7.0 or later.
env:
CONTAINERD_ADDRESS: /run/k3s/containerd/containerd.sock
K3S_KUBECONFIG_MODE: "644"
INSTALL_K3S_EXEC: "--disable traefik"
images:
- location: https://github.com/lima-vm/alpine-lima/releases/download/v0.2.9/alpine-lima-rd-3.14.3-x86_64.iso
arch: "x86_64"
digest: "sha512:b3892ab70ff3140c7ffaa7ace0eef77b047acf633c00bc375abb867caa618c5bd2d94a71638fae7ef10c462c5d28560bdf7c68d603fa6944767700f08fa54a64"
- location: https://github.com/lima-vm/alpine-lima/releases/download/v0.2.9/alpine-lima-rd-3.14.3-aarch64.iso
arch: "aarch64"
digest: "sha512:416216a86742b5e653375019fc1e4ff57314f75d26a7d170e7680ff896616f1a45e82a0dca81c989492b7c43c624be80a0719a65563ea0359eab57623b01cfbc"
mounts:
- location: "~"
- location: "/tmp/lima"
writable: true
# containerd is managed by k3s, not by Lima, so the values are set to false here.
containerd:
system: false
user: false
# CPUs: if you see performance issues, try limiting cpus to 1.
# 🟢 Builtin default: 4
cpus: 4
# Memory size
# 🟢 Builtin default: "4GiB"
memory: "8GiB"
# Disk size
# 🟢 Builtin default: "100GiB"
disk: "100GiB"
provision:
- mode: system
script: |
#!/bin/sh
sudo apk add --update --no-cache curl wget
curl -sfL https://get.k3s.io | sh -
probes:
- script: |
#!/bin/bash
set -eux -o pipefail
if ! timeout 30s bash -c "until test -f /etc/rancher/k3s/k3s.yaml; do sleep 3; done"; then
echo >&2 "k3s is not running yet"
exit 1
fi
hint: |
The k3s kubeconfig file has not yet been created.
Run "limactl shell k3s sudo journalctl -u k3s" to check the log.
If that is still empty, check the bottom of the log at "/var/log/cloud-init-output.log".
portForwards:
- guestSocket: "/run/user/{{.UID}}/buildkit/buildkitd.sock"
hostSocket: "{{.Dir}}/sock/buildkitd.sock"
message: |
To run `kubectl` on the host (assumes kubectl is installed):
----
$ mkdir -p "{{.Dir}}/conf"
$ export KUBECONFIG="{{.Dir}}/conf/kubeconfig.yaml"
$ limactl shell {{.Name}} sudo cat /etc/rancher/k3s/k3s.yaml >$KUBECONFIG
$ kubectl ...
----
To run `buildkit` on the host (assumes buildctl is installed), run the following commands:
-------
export BUILDKIT_HOST="unix://{{.Dir}}/sock/buildkitd.sock"
buildctl debug workers
-------Any thoughts how to work with these scenarios is highly helpful.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request