Search code examples
dockerarm64k3sarchlinux-armk3d

Unable to deploy cluster(k3d->k3s) on ARM64, fails to spin up serverlb node


I am trying to setup a k3s cluster with k3d for use together with portainer.

I am running the latest archlinux-arm on the rockpro64 with the latest docker version, along with a current version of kubectl and k3d, all compatible with ARM64, and I verified that each works indvidually(k3d cluster create works as well for setting up a default cluster). I am following this writeup and want to setup a k3s cluster for it using k3d:

k3d cluster create portainer --api-port 6443 --servers 1 --agents 1 -p "30000-32767:30000-32767@server:0"

However when I run this command I get the following error when it spins up the third container:

Failed Cluster Start: Failed to add one or more helper nodes: runtime failed to start node 'k3d-portainer-serverlb': docker failed to start container for node 'k3d-portainer-serverlb': Error response from daemon: driver failed programming external connectivity on endpoint k3d-portainer-serverlb (6f550a0c0166d3d6ed0fa1a43842d4414c5b9e043d162e889321d57b187183ce): Error starting userland proxy: 

The only relevant post I could find was this issue where apparently reducing the number of exposed ports worked. So I tried 31k-32k but that didn't change anything. Furthermore I don't think the number of ports is the issue, as the board handles the load quite well and RAM usage peaks at 1.5GB/4GB and goes down quite a bit before it crashes a few seconds later. So exposing the ports does cause some work to be done, but it doesn't crash because e.g. it ran out of memory.

Any ideas of how to do this?


Solution

  • The issue was the large port-range for some reason. Running the create command without port-forwarding and adding required ports later using k3d cluster edit portainer --port-add works.