Cluster buildkit on Mac M1
# 🌱|help-and-getting-started
m
Hey everyone, I've setup a garden project with a deployment registry & k3d. The project buildMod is setup on
cluster-buildkit
and deployment are working. But build does not work anymore since i've switch from my ArchLinux to Mac M1 I suppose the platform build target is the problem. If you have something in mind that could help me.
I have logs from garden-builkit Pod,
time="2023-09-28T14:38:28Z" level=info msg="auto snapshotter: using overlayfs" time="2023-09-28T14:38:28Z" level=warning msg="using host network as the default" time="2023-09-28T14:38:28Z" level=info msg="found worker \"kgfv7crt7hc592vg4zpu6isc2\", labels=map[org.mobyproject.buildkit.worker.executor:oci org.mobyproject.buildkit.worker.hostname:garden-buildkit-65697bdc4d-bhffh org.mobyproject.buildkit.worker.network:host org.mobyproject.buildkit.worker.oci.process-mode:sandbox org.mobyproject.buildkit.worker.snapshotter:overlayfs], platforms=[linux/amd64 linux/amd64/v2 linux/arm64 linux/riscv64 linux/ppc64le linux/s390x linux/386 linux/mips64le linux/mips64 linux/arm/v7 linux/arm/v6]" time="2023-09-28T14:38:28Z" level=warning msg="skipping containerd worker, as \"/run/containerd/containerd.sock\" does not exist" time="2023-09-28T14:38:28Z" level=info msg="found 1 workers, default=\"kgfv7crt7hc592vg4zpu6isc2\"" time="2023-09-28T14:38:28Z" level=warning msg="currently, only the default worker can be used." time="2023-09-28T14:38:28Z" level=info msg="running server on /run/buildkit/buildkitd.sock"
2023/09/28 14:38:57 http2: server: error reading preface from client localhost: bogus greeting "Error while loading init" container_linux.go:380: starting container process caused: process_linux.go:393: copying bootstrap data to pipe caused: write init-p: broken pipe time="2023-09-28T14:38:57Z" level=error msg="/moby.buildkit.v1.Control/Solve returned error: rpc error: code = Unknown desc = frontend grpc server closed unexpectedly\n" time="2023-09-28T14:38:57Z" level=error msg="failed to kill runc 8fg9qf46tukd32smm08k7md5d: buildkit-runc did not terminate successfully: exit status 1: container \"8fg9qf46tukd32smm08k7md5d\" does not exist\n" 2023/09/28 14:39:00 http2: server: error reading preface from client localhost: bogus greeting "Error while loading init" container_linux.go:380: starting container process caused: process_linux.go:393: copying bootstrap data to pipe caused: write init-p: broken pipe time="2023-09-28T14:39:00Z" level=error msg="/moby.buildkit.v1.Control/Solve returned error: rpc error: code = Unknown desc = frontend grpc server closed unexpectedly\n" time="2023-09-28T14:39:00Z" level=error msg="failed to kill runc v14rd5d914tn6u92ksvfiokx8: buildkit-runc did not terminate successfully: exit status 1: container \"v14rd5d914tn6u92ksvfiokx8\" does not exist\n" time="2023-09-28T14:39:01Z" level=info msg="trying next host" error="failed to do request: Head \"https://k3d-registry.host.k3d.internal:5000/v2/formancehq/operator/manifests/_buildcache\": http: server gave HTTP response to HTTPS client" host="k3d-registry.host.k3d.internal:5000" time="2023-09-28T14:39:02Z" level=error msg="/moby.buildkit.v1.Control/Solve returned error: rpc error: code = Unknown desc = process \"/bin/sh -c apk add --no-cache postgresql15-client\" did not complete successfully: exit code: 1\n"
The platform seems to be rightly configured 🧐
And Logs retrieved by garden,
c
Hey @most-window-13633 , there shouldnt be any issue building on an M1 with garden and cluster-buildkit. Are you using docker desktop for local k8s? I found this thread related to
Error while loading init
, https://github.com/docker/compose/issues/10240. Maybe its trying to build for the wrong architecture?
m
Hey @cold-jordan-68753 , I'm using k3d with docker-desktop; that was my first thought. I'll try to hard set it directcly in containerfile; They mention something related to ~/.docker config files.
q
I would try Docker Desktop's integrated Kubernetes flavor first and see if that works. If it does, then you know it's a k3d thing. If it doesn't then there might be something more fundamental at foot.