Working side by side with developers, we are always searching for ways to let them run their development, in the same way they do in production, so Kubernetes should run in their devices in the same way that it does in the cloud. A lot of solutions have emerged to tackle this issue (like minikube) that should be lightweight, but unfortunately lack functionality and are not production ready. Deploying an entire k8s solution was not an easy task (neither a light task for our CPU), until Rancher gave us k3s.
So, What is exactly k3s?
K3S is a lightweight kubernetes. A fully functional and certified distribution built with IoT in mind, but ready to be deployed on any device. It is multi-architecture from the beginning, very easy to install, all in a tiny 40MB binary.
Why we love k3s?
It’s a certified Kubernetes distribution, so what you are doing in your laptop can be done in the same way in production. This means security is there, rbac is available, and there is no API bound to the world without authentication.
But that’s not all, folks! They also provide a local storage provider (which means that you can have PVC by default!), service load balancer, a helm controller, and a Traefik ingress controller (again, in a 40MB binary!). The topic should be: Why doesn’t everyone love it?
Understood, but how do they keep the romance alive?
Rancher is actually playing with some cool features that you can try, the best of which is that you can have High Availability in your Control Plane! How can they do that if they replaced the etcd with an embedded SQLite? They have DSQLite (The D is for Distributed), so you don’t need an external database, but you could have one if experimental is not good for you –not everyone can live at the edge, especially if you run production workloads!
Ok sir, you convinced me, how can I get up and running with k3s?
I gave you a lot of words, so, now’s the heavy tutorial…. which will take you less time than pouring a draft beer.
First step, you should meet the requirements: any flavor of Linux on a host with 1 CPU, 512 MB of RAM, and a x86 or arm chipset. Yes, don’t let your Raspberry collect any more dust on your desk, plug it in!
Then, you should install k3s, by just typing:
And finally, run the server and have some fun, we promise that you will love it!
That’s it, now spread the word, and follow us because these are the first steps to dive deeper into the #IoTOps world.