-
-
Notifications
You must be signed in to change notification settings - Fork 466
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
Image import doesn't work on macOS with Apple M1 #954
Comments
Hi @ThomasVitale , thanks for opening this issue! Sorry I got back to it that late. |
@ThomasVitale , any update on this? |
Feel free to reopen if it's still present in the upcoming v5.4.0 release 👍 |
@iwilltry42 I'm facing the same problem as mentioned above on Mac OS Apple M1 and k3d v5.4.1 |
@iwilltry42 I'm seeing this issue on ubuntu when upgrading from k3d 5.3.0 to 5.4.1. I'm seeing output like:
One thing that jumps out: the code in Lines 125 to 127 in 852df77
Compare that to this other k3d code to import images into clusters (rather than nodes) which fails if any individual image fails to import: Lines 75 to 86 in 7b1b416
Or even this code in the same Lines 114 to 116 in 852df77
Should |
I am also using m1 and k3d image import fails. :( my k3d version is
and then, when I deployed this image to k3d clsuter, I got error also my docker image architecture it's well running in docker desktop but just not work k3d cluster.
|
@ethanttbui , @CodingCanuck & @heesuk-ahn , please follow along in the new issue #1072 |
I have the same problem... Any update on this topic ? |
To add some info, I have this happening to me and executed the following (some stuff altered for privacy):
The output I got was
In my mind this at least points into the tarball not being correctly produced, so I decided to compare the output of k3d-tools save with something else.
Saving the image directly in my mac and then copying it into the volume and manually importing (ctr image import) failed with the same error. Then I tried saving the image on my mac again but this time using the hash reference (e.g. When I inspected the hash-saved-image tar, did sha1sums on all the contents and then found only 2 differences comparing to the one saved by k3d:
I then exec-ed into the tools node again, mde those 2 modifications (delete repositories and set RepoTags to null) and placed a tar of the outcome in /k3d/images/test1.tar. Finally, I did Now, I haven't enough knowledge about the image format to understand why this is causing this to fail, but at least it seems to be the cause. Happy to provide more info or do more tests, this seems quite frequent on my end. Edit: Although ctr imports the image, when I run
The image is amd64. |
@iwilltry42 how do we reopen this? Still observing this on 5.4.6. Thakns |
ran into this as well, thought i'd share some more findings. contextvery relevant fact here is that i'm running this on an M1 mac.
problemfwiw i suspect this issue is related: containerd/containerd#6441, particularly the in-depth explanation here (containerd/containerd#6441 (comment)).
fixes were identified for this and merged to i tried updating
unfortunately i still got the same errors after updating and following the steps outlined below:
it looks like containerd 1.6.6 was released in june, which would predate the above fixes so that makes sense then. update: bumped the findingsi was getting the same error messages as explained above.
manual import approachgiven the aforementioned issue, i wanted to confirm whether the problem was in fact stemming from discrepancies in underlying architecture. first i ran an image import to ensure the tarball persists locally:
i made a note of the logs that show the full
i then ran here, i re-ran the
unlike before, now it unpacks - little victories 😄... i then ran
when running
the above error ( i noticed
so that seemed like the next thing to try... docker save approachsince
to import an image, run the following instead of
this is almost the same approach as what i was doing above, except i'm skipping the in theory, this ought to make your image(s) available and i suspect the above could even function as a workaround for some, but that assumes the source image has multi-platform builds available to be saved in the first place. unfortunately, this was not the case for me as the image(s) in question don't currently have builds compatible with the underlying architecture of the
the workaround to the workaround might be rebuilding the affected image(s) with |
What did you do
How was the cluster created?
k3d cluster create mycluster
What did you do afterwards?
k3d image import my-image:1.0 -c mycluster
k3d image import my-image:1.0 -c mycluster -m direct
What did you expect to happen
I expected the image to be loaded correctly, but it didn't. Initially, I considered whether it was a problem with the containerd CLI when loading arm64 images (similar to kubernetes-sigs/kind#2549), but it fails consistently also with images built specifically for amd64.
Screenshots or terminal output
The same error is thrown running any of the previous commands.
The final message says the image has been imported correctly, even if an error is thrown. Therefore, I tried running the image as a Pod and it fails as follows.
Which OS & Architecture
Which version of
k3d
Which version of docker
The text was updated successfully, but these errors were encountered: