How can I easily create a kubernetes cluster on KVM?

6/16/2021

I'm looking for a way to create a live Kubernetes cluster without too much hassle.

I've got a nice HP server, which could run a few VM's with kubernetes on top. The reason for VM's is to isolate this from the host machine. Ideally, the VMs should only run containerd and kubelet and are essentially disposable for node-upgrades.

However, I get lost in what tooling would provide this. minikube? microk8s? k3s? rancher? charmed kubernetes? some existing qemu image? some existing vagrant config? The more managed it is, the better. So far I liked minikube, but it doesn't have "start on reboot" for example, nor the flexibility for node upgrades.

-- vdboor
k3s
kubernetes
kvm
minikube
vagrant

1 Answer

6/16/2021

I have tried a lot of tools to train for the CKAD certification. For my usage, the better option for a local cluster was k3s and multipass (for online clusters, I have used Civo). Both are very fast to proceed their respective tasks, so it allows me to create clusters at will and dispose them to be able to work on clean environments.

  • multipass to create VM quickly
  • k3s which is nothing else than a lightweight kubernetes

You can find easily some tutorials to automate the creation of clusters for example:

-- Arnaud Develay
Source: StackOverflow