-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Creating a kind cluster as a AMD64 on a host ARM 64 machine #2738
Comments
This is not supported and will not work, you need to use the architecture on which the docker daemon is running.
... and that is why, qemu userspace / binfmt_misc is a cool trick, but it's not sufficient for running something complex like a kind node. We do not intend to support this. You need to run a virtual or real machine of the desired architecture and run docker in it. |
That's not accurate. KIND creates docker containers running multiple processes inside them.
We don't support creating clusters by running docker commands without the kind tool. There's a lot that needs to be orchestrated at runtime.
It would be an amd64 container (not image), and there is one, but not in a way that can run complex workloads like kind.
For more on what docker is doing and some idea why it won't work: https://ownyourbits.com/2018/06/13/transparently-running-binaries-from-any-architecture-in-linux-with-qemu-and-binfmt_misc/ |
Thanks @BenTheElder for the information, |
not at all! 😅 |
@BenTheElder any chance running an amd64 kind node on m1 mac is more feasible now that they've added rosetta support? |
It should either work without us doing anything, or it won't work. I don't have docker desktop so someone else will have to test is Rosetta is being used in a way that works for this purpose. You can do so most clearly by explicitly using an amd64 image digest. So for example |
Quick followup. I've just tried it and it didn't work unfortunately 😞 It timed out waiting for the kubelet to become healthy. Thanks for the steps on how to try this out
|
Hi all, I also get the same results. Is there any other solution available? Most of my app images are in amd64 and I would like to use that in local KIND cluster in m1 machine. KIND cluster can able to run the app amd64 images but performance is not so good. |
Unfortunately this is not going to work great, I highly recommend porting images to the host architecture. |
What am I trying to do:
Trying to build a Service,, lets say Service A, as an image in AMD on a ARM hostmachine
And running that machine on K8 which is started by Kind which is possible should be AMD 64.
They were other articles on using UTM etc... But I thought of giving this a shot
The process is as follows,
docker build --platform linux/amd64 -t servicea .
kind create cluster
--config=./kind-cluster.yaml
--name=ServiceA]
This step (2) creates a machine in ARM 64
So, I thought of creating the machine itself as a AMD 64 by replacing the
kind create cluster
command with thisdocker run --platform linux/amd64 --hostname servicea-control-plane --name servicea-control-plane --label io.x-k8s.kind.role=control-plane --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run --volume /var --volume /lib/modules:/lib/modules:ro --detach --tty --label io.x-k8s.kind.cluster=servicea --net kind --restart=on-failure:1 --init=false --publish=0.0.0.0:9090:30000/TCP --publish=127.0.0.1:61145:6443/TCP -e KUBECONFIG=/etc/kubernetes/admin.conf kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
What happened:
When I tried the above command and started the container from the image, I got the below
What you expected to happen:
I was expecting a AMD. 64 image would have been created
Environment:
kind version
):kind v0.11.1 go1.16.4 darwin/amd64
kubectl version
):Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.13", GitCommit:"53c7b65d4531a749cd3a7004c5212d23daa044a9", GitTreeState:"clean", BuildDate:"2021-07-15T20:58:11Z", GoVersion:"go1.15.14", Compiler:"gc", Platform:"darwin/amd64"}
docker info
):The text was updated successfully, but these errors were encountered: