Kubernetes cluster using Talos Linux on KVM/libvirt, managed by Pulumi via python.
- KVM/libvirt
- Python 3.x
- kubectl
- talos image
- Pulumi CLI
- talosctl
cluster-config.yaml- Cluster configuration (node counts, resources, image path)Pulumi.yaml- Pulumi project definition
__main__.py- Main Pulumi program (creates VMs with libvirt)
install.sh- Initial setup scriptconfigure-talos-cluster.sh- Configure Talos nodes (applies configs, handles cert rotation)generate-firewalld-rules.sh- Allow remote access to these NAT'd VMs
controlplane.yaml- Talos control plane node configurationworker.yaml- Talos worker node configurationtalosconfig- Talos CLI authentication configPulumi.<cluster-name>.yaml- Pulumi stack configuration file
Read ./install.sh and change the image for your environment. This script is not designed for
various environemnts, is not idempotent, and should be run with care.
Copy sample-cluster-config.yaml to cluster-config.yaml and edit as necessary.
pulumi up
./configure-talos-cluster.shThis uses the default network which is NAT. For this you will need to run the firewalld script.
You may want to use your LAN's DHCP and a bridge network instead.
cat > /tmp/macvtap-network.xml << 'EOF'
<network>
<name>macvtap-net</name>
<forward mode="bridge">
<interface dev="wlo1"/>
</forward>
</network>
EOF
sudo virsh net-define /tmp/macvtap-network.xml
sudo virsh net-start macvtap-net
sudo virsh net-autostart macvtap-netSet your network to macvtap-net.
Additional configuration may be required.