The goal here was to start learning how to use talos to spin up kubernetes clusters. But first there were some yaks…
I’ve been wanting to run kubernetes at home, but wasn’t too keen on having to maintain the underlying OS distros. It just seemed like an annoying distraction. Happily it seemed like the talos team agreed. However, the hard part was to get started. Cloud options cost money, can be slow and usually involve their own issues. Besides, installing on local hardware was the eventual goal. Unfortunately hardware is annoyingly slow when constantly rebooting it.
I realised the simple answer was local virtual machines. I tend to overspec my laptops with too much ram specifically so I can use VMs since I keep having to work on FreeBSD or other Linux distros. Years ago I started using libvirt and virt-manager for all my VM needs. In the pre-systemd days I had DNS working just fine.
DNS for libvirt in a systemd-resolverd world
I use the following script to configure this on any system
I want to use this on. It runs as an unprivileged user (hence the sudos).
It assumes a default libvirt system. The network is 192.168.122.0/24
and the bridge is virbr0
. If you’ve changed that (why?) you’ll want
to change this.
|
|
So now dns works. If I set the host name in the virtual machine I can
get to it with the name.vm
.
Not hugely important yet, but I eventually want to spin up a local ACME server and generally figure out how ingress works with k8s so dns working would be nice.
Edit: Added bit to tell libvirt’s dns server what domain it is serving!