k3s Kubernetes

If you want to start with Kubernetes on your workstation or even want to test with small clusters, I really recommend to take a look at Rancher’s k3s.

Installation is as simple as calling the script at get.k3s.io, but you can also just simply download the Go Binary at GitHub and make it executable.

See the Quick Start Instructions and you can begin, systemd setup was also not too complicated (3 tasks in Ansible for installation to service activation).

Once you copy your /etc/rancher/k3s/k3s.yaml to $HOME/.kube/config you can transparently use standard kubectl instead of k3s kubectl.

Even though I am unrelated to Rancher, it sounds quite like an advertisement to this point. It’s just, the tool helps me a lot during work on k8s tasks and we are not finished yet.

Cleanup of Environment (Temporary Use)

Just one word of warning, it’s really easy to get k3s running on a modern Linux workstation, but it’s quite tedious to cleanup without a reboot, if you just want to run it temporarily. I am currently working on a proper cleanup script for my environment (draft at k3s_cleanup.sh).

To make it worse, shutdown and reboot will take a very long time, because systemd is waiting for decommissioning of some resources. I did no proper debugging, but if I cleanup k3s beforehand with the script, the problems will disappear.

I think, you will find an uninstall script, if you are using the installation script, but I just want a proper shutdown of the systemd service.