Minikube在M1硬件上部署Linux/AMD64图像
我知道可以使用- Platform linux/amd64
flag在docker run
上使用- platform linux/amd64
flag在Apple的M1处理器上本地运行。
但是,如何在同一M1硬件上运行的本地Minikube群集上部署相同的图像?
尝试时的输出是:
Failed to pull image "registry/image:tag":
rpc error: code = Unknown desc = no matching manifest for linux/arm64/v8 in the manifest list entries
如何告诉Minikube在部署时会导致与- Platform Linux/AMD64
标志相同的效果?
I know it's possible to run locally on Apple's M1 processor an amd64 image by using the --platform linux/amd64
flag on docker run
.
But how do I deploy that same image on a local Minikube cluster, running on this same M1 hardware?
Output when trying is:
Failed to pull image "registry/image:tag":
rpc error: code = Unknown desc = no matching manifest for linux/arm64/v8 in the manifest list entries
How do I tell Minikube to cause the same effect as --platform linux/amd64
flag on its deployment?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了同一问题。我的解决方案是:
Docker Pull注册表/图像:TAG - Platform Linux/AMD64
。从不
将您的容器规格的
Minikube
将ImagePullPolicy
设置为始终
每当使用最新
标记的映像时,请手动将其设置为从不
迫使节点使用您已经下载的图像。I ran into the same issue. My solution was to:
docker pull registry/image:tag --platform linux/amd64
.imagePullPolicy
toNever
, which makes it get the image locally rather than pulling it from the registry:Both
kind
andminikube
set theimagePullPolicy
toAlways
whenever an image with thelatest
tag is used, so manually setting it toNever
forces the node to use your already downloaded image.不确定使用Docker桌面,但是如果您使用Colima,则可以为Lima VM选择拱门。
一旦将Docker引擎运行在M1上的ARCH X86_64的VM中,它将拉动AMD64图像。
使用
colima start -ark x86_64
在启动时使用该拱门。然后,您可以在Colima上运行Minikube,也可以使用Colima内置的Kubernetes群集。
注意:您可能需要使用 - -runtime容器来完成此工作。我有使用默认运行时(Docker)的问题
Not sure with Docker Desktop, but if you use Colima, you can select the arch for the lima VM.
Once you have a docker engine running in a VM with arch x86_64 on the M1, it will pull amd64 images.
use
colima start --arch x86_64
on startup to use that arch.You can then run MiniKube on Colima, or just use the Colima built-in kubernetes cluster.
Note: You may need to use the --runtime containerd to make this work. I have had issues with using the default runtime (docker)