K3S import into Rancher not working

I previously had a Pi4 / K3S cluster imported into Rancher a couple months ago (Rancher 2.3.3). For a variety of reasons I need to rebuild and am not able to get it to cooporate.

I’m using k3sup to build the K3S cluster on the Raspberry Pi 4s. And have tried both Ubuntu 19.10 and Rasbpian on the Pi 4’s. K3S seems to work ok. However, I have been unable to import it into Rancher.

So with a bit of investigation I found that rancher/rancher-agent:v2.3.5 doesn’t support arm64. but doing a docker pull on rancher/rancher-agent:v2.3.5-arm64 succeeds on raspbery pi 4:

pi@raspberrypi:~ $ sudo docker pull rancher/rancher-agent:v2.3.5-linux-arm64
v2.3.5-linux-arm64: Pulling from rancher/rancher-agent
Digest: sha256:8809281719c6cca7a11c1d61dea44475e7388f6a36e2b9b3fb84275b98a8d39e
Status: Image is up to date for rancher/rancher-agent:v2.3.5-linux-arm64
pi@raspberrypi:~ $ sudo docker pull rancher/rancher-agent:v2.3.5
v2.3.5: Pulling from rancher/rancher-agent
no matching manifest for unknown in the manifest list entries
pi@raspberrypi:~ $ 

So I downloaded (rather than applying) the yaml that was provided by Rancher for importing. Added ‘-linux-arm64’ to the end of the images (two statements in the yaml). And then applied the YAML. And get further - but still not working.

Here is where it is now failing:

Feb 27 17:10:29 raspberrypi k3s[31210]: I0227 17:10:29.400171   31210 controller.go:107] OpenAPI AggregationController: Processing item v1beta1.metrics.k8s.io
Feb 27 17:10:35 raspberrypi k3s[31210]: E0227 17:10:35.046920   31210 pod_workers.go:191] Error syncing pod fbb3be69-7c04-48fe-b4ea-b8f02d516e7c ("cattle-node-agent-jjjl4_cattle-system(fbb3be69-7c04-48fe-b4ea-b8f02d516e7c)"), skipping: failed to "StartContainer" for "agent" with CrashLoopBackOff: "back-off 2m40s restarting failed container=agent pod=cattle-node-agent-jjjl4_cattle-system(fbb3be69-7c04-48fe-b4ea-b8f02d516e7c)"
Feb 27 17:10:49 raspberrypi k3s[31210]: E0227 17:10:49.053513   31210 pod_workers.go:191] Error syncing pod fbb3be69-7c04-48fe-b4ea-b8f02d516e7c ("cattle-node-agent-jjjl4_cattle-system(fbb3be69-7c04-48fe-b4ea-b8f02d516e7c)"), skipping: failed to "StartContainer" for "agent" with CrashLoopBackOff: "back-off 2m40s restarting failed container=agent pod=cattle-node-agent-jjjl4_cattle-system(fbb3be69-7c04-48fe-b4ea-b8f02d516e7c)"
Feb 27 17:11:02 raspberrypi k3s[31210]: E0227 17:11:02.044207   31210 pod_workers.go:191] Error syncing pod fbb3be69-7c04-48fe-b4ea-b8f02d516e7c ("cattle-node-agent-jjjl4_cattle-system(fbb3be69-7c04-48fe-b4ea-b8f02d516e7c)"), skipping: failed to "StartContainer" for "agent" with CrashLoopBackOff: "back-off 2m40s restarting failed container=agent pod=cattle-node-agent-jjjl4_cattle-system(fbb3be69-7c04-48fe-b4ea-b8f02d516e7c)"

anyone have any suggestions?

I wanted to create a script out of this initial instruction set, but it is kind of vague, so I postponed the creation of the script:


Actually, I see now that you are part of the discussion there already. So you should know about this, already.

Well I ran into the same issue. Got a new Rpi 4B, installed k3s on it (using the script, no custom settings), and tried to import it into Rancher. It failed on trying to pull cattle-cluster-agent and shortly after k3s became unavailable altogether.

Something in the back of my head told me I believe this setup only works with arm64 and that’s not the default kernel for Raspbian OS / Raspbian Lite (which is 32 bit armv71). I uninstalled k3s, switched my kernel to 64 bit using: https://www.sindastra.de/p/1345/switch-your-raspberry-pi-to-64-bit-kernel-raspbian/, reinstalled k3s and was able to import it into Rancher just fine.

Hopefully this will helps somebody else.

1 Like

That helped me! I installed the 64 bit OS and now the rancher-agent installs. I have a new error now, but this moved the ball forward.

Thx!