Challenge: Install Kubernetes cluster on Arch Linux
For my nice littler home setup, I’m running a couple of Docker containers with Home Assistant and Roon (for the audio enthousiasts). As I’m building my knowledge about Kubernetes, it would be nice to run those containers on a new shiny Kubernetes cluster.
The plan was to install k3s on Arch Linux, but that wasn’t a smooth ride. Something that happens more if you’re used to working with Linux. But that’s a good thing! It forces you to investigate and gain deeper understanding about some internals of the system. To figure out why the cluster was restarting over and over, I started by investigating the logs with journalctl.
sudo journalctl -uk3s -f
There I could see the error below being printed just before the cluster went down.
Jan 08 19:50:27 nuc k3s[2522128]: time="2025-01-08T19:50:27+01:00" level=error msg="flannel exited: failed to register flannel network: operation n ot supported"
Apparently there was an issue with Flannel. That’s an addon for Kubernetes to manage networking in the cluster.
After searching the internet, I found a small hint that suggested that you can specify which networking interface flannel should use.
But because flannel was being installed in a default way as part of k3s, I had no way of configuring that.
That’s why I started looking at the available networking interfaces and saw multiple ones: wifi, wired lan and a bunch of virtual interfaces.
After bringing down wifi and cleaning up the virtual interfaces, stuff began to work!
The k3s cluster is now running and ready for further configuration.