k3s is lightweight kubernetes distribution, perfect for home-lab and sandbox purposes. It scales well, from RPi to 4xLarge 32GB servers. It is super easy to install. Assuming you have linux distribution:

curl -sfL https://get.k3s.io | sh –

Check for Ready node, takes ~30 seconds

sudo k3s kubectl get node

and you will see something similar to this:
NAME STATUS ROLES AGE VERSION
fedora-1.home Ready control-plane,master 12d v1.30.5+k3s1


After that you can copy kube config from /etc/rancher/k3s/k3s.yaml to ~/.kube/config and enjoy fully working kubernetes cluster.

If you intend to expand your cluster, then persistent volume claims sooner or later will become an issue. Default storage class for k3s is local-path. It is working fine for single-node clusters. But distributed storage is must-have for multi-node clusters. Even though, you can setup PVC’s using nfs backend, I would not recommend it. Performance and stability issues are common for that solution. Currently, Ceph and Longhorn are most common choices. From those two, I chose Longhorn, because it is lightweight, easy, and has full list of features working out of the box.

Leave a Reply

Your email address will not be published. Required fields are marked *

+