How bashfulrobot/libvirt-talos works
Project Type and Purpose
This is an Infrastructure as Code (IaC) project that deploys a Talos Linux-based Kubernetes cluster using libvirt (KVM) virtualization. The project is designed to be consumed as a Terraform module.
Main Components
A. Infrastructure Layer:
• LibVirt/KVM Hypervisor
• Virtual Network (NAT/Route mode)
• Storage Volumes for VMs
B. Cluster Components:
• Control Plane Nodes (Multiple instances)
• Worker Nodes (Multiple instances)
• Virtual IP (VIP) for API Server
• Cilium CNI (Optional component)
C. Configuration Management:
• Talos Configuration System
• Machine Secrets
• Kubernetes Configuration
┌─ Infrastructure Layer ─────────────────────┐
• ┌─ LibVirt/KVM ──────────────────────────┐ │
• ┌─ Virtual Network ─────────────────┐ │ │
• (172.16.16.0/24) │ │ │
• ┘ │ │
• ┌─ Storage ──────────────────────────┐ │ │
• VM Volumes │ │ │
• ┘ │ │
• ┘ │
• ┘
┌─ Cluster Layer ──────────────────────────┐
• ┌─ Control Plane ────┐ ┌─ Workers ─────┐ │
• CP1 CP2 CP3 │ │ WK1 WK2 │ │
• (172.16.16.10-12) │ │ (172.16.16.20+)│ │
• ┘ └───────────────┘ │
• ┌─ Network ────────────────────────────┐ │
• VIP: 192.168.1.79 │ │
• Cilium CNI (Optional) │ │
• ┘ │
• ┘
┌─ Configuration Layer ────────────────────┐
• ┌─ Talos ─────────┐ ┌─ Kubernetes ────┐ │
• Machine Secrets │ │ Kubeconfig │ │
• Node Configs │ │ API Endpoint │ │
• ┘ └────────────────┘ │
• ┘
Important Relationships
• Network connections between nodes
• VIP relationship with control plane nodes
• Configuration flow from Talos to nodes
• Cilium's integration points
Additional Elements
• Version information for key components (Talos v1.9.1, K8s v1.31.3)
• IP address ranges and network details
• Resource specifications (CPU, Memory, Disk) for nodes
Notes for Implementation
• Clear labels for all components
• Optional nature of Cilium CNI
• State management consideration (local vs. remote)
• Factory image integration points
Remember to include a note about the sensitive nature of the configuration files (kubeconfig, talosconfig) and their state management considerations, as mentioned in the README.