How I built my Kubernetes Homelab – Part 1
When I started to learn about Kubernetes, I had many flash backs to the year 2004 when I had my first contact with virtualization especially VMware ESX Server 2.5 and vCenter 1.0 and this was mind blowing for me and for all my customers. Even after 2 years working with this technology I had events where I demonstrated how vMotion or HA are working. The customer started to rethink their datacenters.
Ok, now back to the year 2021. It is not a secret that I work as Senior Systems Engineer for Veeam and I first got aware about Kubernetes when we announced the acquisition of Kasten back in October 2020. I started this year to learn about Kubernetes and the best way to learn for me is to install and try what happens. I think this is the fourth try to build a cluster. I learned much and want to share my lessons learned with you.
First of all I had to update my Homelab from an very old vSphere 6.7 version to Update 3. I was also thinking about to upgrade my Homelab to Version 7.0, but for certain reasons I decided to leave it for now. I figured out that vSphere 7.0 is not the only version which provides a Cloud Native Storage (CNS). VMware has also integrated this CNS provider to vSphere 6.7U3.
In this part we will prepare the virtual machines for the Kubernetes cluster. I created three virtual machines. with the same configuration.
|VM name||IP address||Role|
I just created a fourth machine called “lab-kube-n3” to show you the whole process of deploying and configuring the lab machines. We start with creating a new virtual machine and I put it in a VM folder called “Kubernetes” but this is not a requirement. On the next to steps of the wizard you can select your host/cluster and a datastore where you want to store the virtual machine.
To use Cloud Native Storage later with this virtual machine you need to select a higher VM hardware version than used by default. When you select “ESXi 6.7 Update 2 and later” the virtual machine will be created with hardware version 15, which is require by the CNS.
I use for my lab deployment Ubuntu Server 20.04 LTS and need to select here the correct guest OS settings. The virtual machine will be installed via a ISO image which is configured later.
I have configured the virtual machine to use 2 CPUs and 4 GByte of RAM. I created a hard drive with 30 GByte capacity and changed the type of the SCSI controller to “VMware Paravirtual” because this is a requirement for virtual kubernetes nodes as well. To install the operating system I uploaded the Ubuntu ISO to a datastore and “put it” into the virtual CD drive.
Now we need to switch to the VM Options and set an additional configuration parameter.
We need to set the Configuration Parameter called “disk.EnableUUID” to a TRUE value. With this parameter the VMDK always presents a consistent UUID to the VM, thus allowing the disk to be mounted properly.
After this we can finish the wizard and “Power On” the virtual machine.
In the next part auf this series we will install the operating system and prepare the OS for deploying the kubernetes cluster.