With this Terraform plan you can create one or more virtual machines on Proxmox and install a k3s cluster automatically on it.
- A template named debian-k3s-node that was generated using this repo
- Terraform
- Ansible
- telmate/terraform-provider-proxmox
- k3s-io/k3s-ansible
- A template (currently named
debian-k3s-node
) on the Proxmox host (without cloud-init) - The
root
password currently set toAbc1234_
- A private and public key stored in your home (
~/.ssh/id_rsa
and~/.ssh/id_rsa.pub
) - The packages
git
andansible
installed
Var name | Description | Default |
---|---|---|
vm_count | How many vms should be deployed (min 1 - max 99) | 3 |
proxmox_server | To which api server should be connected | |
proxmox_node | On which node should the vms be created (even in a single node env) | |
proxmox_username | Which username should be used to authenticate | |
proxmox_password | The password for the given user |
You can create a terraform.tfvars
(documentation) to provide all necessary variables. This file is also included within the .gitignore
file
vm_count = 10
proxmox_node = "your_node"
proxmox_server = "your_node.with.fqdn_or_ip"
proxmox_username = "your_user@the_configured_realm"
git clone https://github.com/BaldFabi/proxmox-terraform-k3s-ansible-cluster.git
terraform init
terraform plan -out plan.out
terraform apply plan.out
# show the vmids, ip addresses and root passwords
terraform output nodes