arm64 support

3 Feb 2022 08:46 k3s raspberry-pi

Because I’m running my k3s cluster on Raspberry Pi 4 nodes, and they’re ARM-64 (aarch64), I keep running into problems where applications are compiled for x86_64 (amd64) and don’t run.

For example, I had to use community-built images for ArgoCD, and when you attempt to run the ArgoCD guestbook example, you get the following error:

$ kubectl logs guestbook-ui-85985d774c-lbhnq
standard_init_linux.go:228: exec user process caused: exec format error

This seems like a lot of work, Roger. Why don’t you just add an x86_64 node to the cluster?

Yeah, I could do that – I’ve got a couple of NUCs in the house running Linux – but, because of the difference in size between a Raspberry Pi 4B and a Gen-10 Core i5 NUC with 32GiB RAM, all of my workload would end up running on the NUCs, which doesn’t exactly replicate a production environment.

One other issue I’m finding is that the deploy manifests aren’t specifying the desired node architecture:

...
  nodeSelector:
    kubernetes.io/arch: amd64
...

If they’d done that, instead of the exec format error, the scheduler would have left the pod in Pending, because it wouldn’t be able to find a suitable node for it.

Honestly, though, I’d probably be just as bad at forgetting to specify that…