Pre-requisities
- Linux OS
- Vagrant installed
- vagrant-libvirt plugin installed
- talosctl installed
- kubectl installed
Overview
We will use Vagrant and its libvirt plugin to create a KVM-based cluster with 3 control plane nodes and 1 worker node. For this, we will mount Talos ISO into the VMs using a virtual CD-ROM, and configure the VMs to attempt to boot from the disk first with the fallback to the CD-ROM. We will also configure a virtual IP address on Talos to achieve high-availability on kube-apiserver.Preparing the environment
First, we download the latestmetal-amd64.iso
ISO from GitHub releases into the /tmp
directory.
Create a Vagrantfile
with the following contents:
Bring up the nodes
Check the status of vagrant VMs:192.168.121.203
, 192.168.121.119
, 192.168.121.125
and the worker node has the IP 192.168.121.69
.
Now you should be able to interact with Talos nodes that are in maintenance mode:
Installing Talos
Pick an endpoint IP in thevagrant-libvirt
subnet but not used by any nodes, for example 192.168.121.100
.
Generate a machine configuration:
controlplane.yaml
to add the virtual IP you picked to a network interface under .machine.network.interfaces
, for example: