k3s

fvumbaca/k3s/proxmox

Terraform Module HCL PROXMOX

A terraform module to get k3s up and running on Proxmox VE real quick.

Install
module "k3s" {
source = "fvumbaca/k3s/proxmox"
version = "0.1.2"
}
⭐ Source on GitHub 📦 Registry page
README

terraform-proxmox-k3s A module for spinning up an expandable and flexible K3s server for your HomeLab. Features - Fully automated. No need to remote into a VM; even for a kubeconfig - Built in and automatically configured external loadbalancer (both K3s API and ingress) - Static(ish) MAC addresses for reproducible DHCP reservations - Node pools to easily scale and to handle many kinds of workloads - Pure Terraform - no Ansible needed. Prerequisites - A Proxmox node with sufficient capacity for all nodes - A cloneable or template VM that supports Cloud-init and is based on Debian (ideally ubuntu server) - 2 cidr ranges for master and worker nodes NOT handed out by DHCP (nodes are configured with static IPs from these ranges) Usage > Take a look at the complete auto-generated docs on the Off

Inputs (16)
NameTypeDescriptionDefault
proxmox_nodestringProxmox node to create VMs on. required
control_plane_subnetstring required
support_node_settingsobject({ cores = required
lan_subnetstringSubnet used by the LAN network. Note that only the bit count number at the end i required
node_templatestringProxmox vm to use as a base template for all nodes. Can be a template or another required
master_node_settingsobject({ cores = required
node_poolslist(object({ name = stNode pool definitions for the cluster. required
authorized_keys_filestringPath to file containing public SSH keys for remoting into nodes. required
network_gatewaystringIP address of the network gateway. required
nameserverstringnameserver""
api_hostnameslist(string)Alternative hostnames for the API server.[]
http_proxystringhttp_proxy""
k3s_disable_componentslist(string)List of components to disable. Ref: https://rancher.com/docs/k3s/latest/en/insta[]
cluster_namestringName of the cluster used for prefixing cluster components (ie nodes)."k3s"
proxmox_resource_poolstringResource pool name to use in proxmox to better organize nodes.""
master_nodes_countnumberNumber of master nodes.2
Outputs (11)
k3s_db_password
k3s_db_user
root_db_password
master_node_ips
k3s_server_token
k3s_kubeconfig
k3s_db_name
k3s_db_host
support_node_ip
support_node_user
k3s_master_node_ips
Resources (4)
macaddressnull_resourceproxmox_vm_qemurandom_password
Details
FrameworkTerraform Module
LanguageHCL
Version0.1.2
Cloud PROXMOX
★ Stars90
Forks51
Total downloads1.8k
Inputs16
Outputs11
Resources4
LicenseMIT
Namespacefvumbaca
Updated