Hacker News new | ask | show | jobs
by kkielhofner 2052 days ago
I understand the allure of real hardware and doing this on a physical cluster but I'm always surprised not to see K8s/k3s/whatever running under (inside?) LXD as a learning/experimentation tool discussed more often.

The physical cabling, underlying operating system, bootstrapping etc strikes me as the least of the K8s learning experience and the only advantage of a toy running on Pis vs LXD. Not to mention most K8s deployments these days will be in some cloud provider of choice where most of this is handled... In that case LXD on a local machine with software network bridging, etc probably more closely approximates what most people will go to production with anyway.

I'm a little sour on the whole "LXD only officially distributed via snap" thing too but at least on Ubuntu 18.04 and forward getting a toy X node Kubernetes cluster up and running is trivial and costs nothing more than RAM and disk space. As is commonly known LXD doesn't even require a hypervisor so the hardware requirements are (essentially) anything x86_64. It's also fun to spin up/destroy any number of instances at will just using the command line.

MicroK8s even provides an LXD how-to that should work for your flavor of choice (with a little adaptation, of course):

https://microk8s.io/docs/lxd

Of course if you're actually doing some kind of edge deployment or whatever on actual Raspberry Pi/armv7/arm64 hardware that's the obvious way to go (or you can just run LXD on your Pi) :).

2 comments

That's how I learned and experimented with k8s, I did try VM first but it was too heavy and I used lxd. The idea of building hardware just to run k8 even pi is too much work for me. Some folks say you can power it off, and I say you can lxc stop. I used https://github.com/sebiwi/kubernetes-coreos, it's dated tho.
Rancher has a sibling open source project called k3d that allows you to run single- or multi-node K3S clusters entirely within Docker containers.

https://k3d.io/