In a previous post we covered the deployment of a home k8s lab, but this post will show a much better way to do it as well as improving on the end result – a fully functional local cluster.
The installation is done using Vagrant with Flannel networking and MetalLB for load balancing.
Commands for the session can be downloaded from here: https://jonamiki.com/wp-content/uploads/2019/11/kubectl-demo-commands.txt
Background
Why go through the trouble of setting up a home lab for k8s? Well, while using public cloud services is a quick and easy way it will cost money to deploy and run. It will also rely upon predefined cloud formation templates which have already been created. Doing it locally can provide both a more economical way to use k8s as well as give more insight into the internal workings and how it’s actually set up.
Why not use Minikube? Because it’s overly simplified. Using a cluster deployment like this is not only a better learning and testing experience but it also provides an overall more realistic experience of a “real” k8s installation.
Configuration files
Download the Vagrant, Flannel and MetalLB files from GitHub or clone with Git
git clone https://github.com/jonas-werner/k8s-home-lab-with-vagrant.git