Herding the cats VMs
Before doing any more Kubernetes work I need to get my VMs under control. I need a way to group related VMs together, and ideally manage them as a group. I also want to be able to quickly spin up new VM instances.
The first one is easy. I use the pulldown menu in the top left of the Proxmox console to switch to Tag View, and then assign my Kubernetes The Hard Way VMs a tag. I'll label them kthw:
To tag a VM select it, click on the pencil icon, and pick the tag you want, or type a new one. As a bonus Proxmox automatically color-codes tags, and groups tagged VMs together.
I can work on these VMs as a group in bulk operations by specifying the tag. For instance, I can start all the Kubernetes The Hard Way VMs in one operation by choosing kthw in the "Include Tags" box of the Bulk Start dialog:
This gives me what I need to manage my VMs.
Send in the clones
Proxmox will let me convert any VM into a template, which I can then use as a base for additional VMs.
First I create a new VM, using the same Debian 12 install iso as before. I make two changes in the install process: I manually partition the virtual disk to eliminate the swap partition, so I don't have to manually disable swap post-install, and I skip installing the "Debian Desktop" software.
Once the install completes I log in to the VM, do the usual steps of enabling root ssh logins adding my local user to the sudo group, and installing some essential software:
# Truncate the too-verbose motd
echo 'Your motd here' > /etc/motd
# Essential software
apt install curl git zip unzip
# Cleanup
apt update
apt upgrade
apt autoremove
Let's see how big the VM is:
root@debian12:~# df -k /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 32845584 1807868 29343716 6% /
Plenty of room for additional software.
Now stop the VM, right-click on the VM name, select "Convert to template", and behold:
I've given my template a name reflecting its creation date, since the VM can no longer be updated after being converted to a clone.
I've got my VM tools ready. Time to attack Kubernetes again.
