How alexandrelamberty/proxmox-k3s-iac works
This repository provisions a Proxmox VM fleet and turns it into a highly available K3s cluster. Terraform creates the VMs and Ansible inventory; Ansible then prepares the nodes, initializes the first server, deploys kube-vip, joins the remaining servers through the VIP, and retrieves a kubeconfig. The README documents the runtime workflow, but no source excerpts were provided, so relationships here follow that documentation rather than inspected implementation details.
Main entry points: main.yml Provisioning Workflow · main.tf Terraform · install-other-servers.yml Join Servers · render-openbao-env.sh OpenBao Env Helper
Components 19
Infrastructure
- Terraform
terraform/main.tf - Ansible Inventory
ansible/inventory/hosts.yml.example - Terraform State
terraform/backend.tf - OpenBao Env Helper
terraform/scripts/render-openbao-env.sh
Node Provisioning
- Provisioning Workflow
ansible/playbooks/main.yml - Prepare Nodes
ansible/playbooks/prepare.yml
K3s Cluster
- Initialize Server
ansible/playbooks/install-first-server.yml - K3s Servers
- Install kube-vip
ansible/playbooks/install-kube-vip.yml - API Virtual IP
- Join Servers
ansible/playbooks/install-other-servers.yml - Fetch Kubeconfig
ansible/playbooks/fetch-kubeconfig.yml - Control-Machine Kubeconfig
Other components
- Operator
- Proxmox
- MinIO S3
- OpenBao
- Ansible Control Machine
- Kubernetes API Clients
Connections 23
- Operator → Terraform: runs
- Terraform → Proxmox: creates VMs
- Terraform → Ansible Inventory: writes inventory
- Terraform → Terraform State: stores state
- Terraform State → MinIO S3: uses S3 backend
- OpenBao Env Helper → OpenBao: reads credentials
- OpenBao Env Helper → Terraform: provides environment
- Operator → Provisioning Workflow: runs
- Provisioning Workflow → Prepare Nodes: imports first
- Provisioning Workflow → Initialize Server: imports next
- Provisioning Workflow → Install kube-vip: imports next
- Provisioning Workflow → Join Servers: imports next
- Provisioning Workflow → Fetch Kubeconfig: imports last
- Ansible Inventory → Provisioning Workflow: provides hosts
- Prepare Nodes → K3s Servers: prepares nodes
- Initialize Server → K3s Servers: initializes first
- Install kube-vip → API Virtual IP: deploys
- API Virtual IP → K3s Servers: announces endpoint
- Join Servers → API Virtual IP: joins through
- Join Servers → K3s Servers: adds remaining
- Fetch Kubeconfig → Control-Machine Kubeconfig: retrieves
- Ansible Control Machine → Control-Machine Kubeconfig: receives
- Kubernetes API Clients → API Virtual IP: connects via API