-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Kind Load Image Digest Doesn't Work #2394
Comments
You can load by a digest but you cannot reference it by the digest you pulled. You can list the images in the cluster and see that there is an image loaded, but not with the digest you desired. This is because image digests hash the entire image including the metadata that contains the repo tags in the image, and they will not match. Another common issue is referencing an image by the digest of a manifest list, but manifest lists can only be stored in a registry, not in docker/containerd. Basically you're seeing what happens when you |
You can push to a local registry instead (see the docs for how to set one up), but the digests will again change because the hostname will change. |
I think it may be possible to make this work with some manipulation of the image as loaded to have identical metadata but this has not ever worked in kind and is not a straightforward bug. |
Lol, this is really strange design that digest of Docker images are registry-bound. |
possibly related 🤦 #2734 have not had time to dig back into this.
That's not accurate, I was thinking of the However, digests are frequently pinned to multi-arch images, but |
Hey @BenTheElder 👋 Just to chime in I think I'm seeing the same issue with
or from a tarball via
Neither work, as the image isn't present:
I know this issue isn't closed so it makes sense it still doesn't work, just wanted to +1 the issue. I'd also be happy to contribute a fix if you can point me in the right direction of what changes need to be made 😄 |
The problem is that $ crane manifest gcr.io/knative-releases/knative.dev/operator/cmd/operator@sha256:15fdcd6927ec3415fe2cca17f85c395b67522f716a255bffb23de855c0ccc6b6
{"schemaVersion":2,"mediaType":"application/vnd.docker.distribution.manifest.list.v2+json","manifests":[{"mediaType":"application/vnd.docker.distribution.manifest.v2+json","size":957,"digest":"sha256:a71bad45fe686851238a86408e9cdfcb4dda14b6974e131911bc7fda27e3cc98","platform":{"architecture":"amd64","os":"linux"}},{"mediaType":"application/vnd.docker.distribution.manifest.v2+json","size":957,"digest":"sha256:403cb4e0b91443365813de9df862073302e47122f5441e63188748256fbd3426","platform":{"architecture":"arm","os":"linux"}},{"mediaType":"application/vnd.docker.distribution.manifest.v2+json","size":957,"digest":"sha256:e87490b5b47027452692589cf995c1432ee773293f91b2b0e87c3e40cf22a7f9","platform":{"architecture":"arm64","os":"linux"}},{"mediaType":"application/vnd.docker.distribution.manifest.v2+json","size":957,"digest":"sha256:c6ec9ae95baad76e76a02542bdc7a9d216cbec53909c34d724a10ba55fe83f4a","platform":{"architecture":"ppc64le","os":"linux"}},{"mediaType":"application/vnd.docker.distribution.manifest.v2+json","size":957,"digest":"sha256:22b8326043ba1173ee1a72c5ebf936a5e3f839225d1937d1dd5b842049d1672c","platform":{"architecture":"s390x","os":"linux"}}]}
I haven't had time to dig into if there's a reasonable approach to solve this in an expected and compatible way. |
I think to do this sort of thing properly we'd need a different command with some custom logic to:
Which could get tricky fast ... The OCI layout format using someting like We might be able to do something hackier and whenever we see we're loading a digest we instruct containerd to attach the digest ref to the imported image. Maybe by exec-ing |
Related to #1140? I am having trouble preloading images from the |
…ch is already pulled. For more information : kubernetes-sigs/kind#2394
…ch is already pulled. For more information : kubernetes-sigs/kind#2394
#2570) * Use env variable for the test sleep image in case of using other image reference or same image but with digest in case of disconnected environment * Update E2e test sleep image to use image digest instead of version tag * Incase of kind cluster, manually create tag for image with digest which is already pulled. For more information : kubernetes-sigs/kind#2394
kubernetes-sigs#2570) * Use env variable for the test sleep image in case of using other image reference or same image but with digest in case of disconnected environment * Update E2e test sleep image to use image digest instead of version tag * Incase of kind cluster, manually create tag for image with digest which is already pulled. For more information : kubernetes-sigs/kind#2394
What happened:
I loaded a docker image by digest and kind seemed to load the image correctly. But, unfortunately the image wasn't loaded.
Here is a redacted snippet of the load command and response:
What you expected to happen:
I expected the image digest to be loaded into kind and to be accessible via it's digest.
How to reproduce it (as minimally and precisely as possible):
Try to load an image digest into kind and try to use that image digest, or try to look for that image digest via crictl.
Anything else we need to know?:
Environment:
kind version
): kind v0.11.1 go1.16.4 linux/amd64kubectl version
):docker info
):/etc/os-release
):The text was updated successfully, but these errors were encountered: