k3s
fvumbaca/k3s/proxmox
A terraform module to get k3s up and running on Proxmox VE real quick.
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
| Name | Type | Description | Default |
|---|---|---|---|
| proxmox_node | string | Proxmox node to create VMs on. | required |
| control_plane_subnet | string | required | |
| support_node_settings | object({ cores = | required | |
| lan_subnet | string | Subnet used by the LAN network. Note that only the bit count number at the end i | required |
| node_template | string | Proxmox vm to use as a base template for all nodes. Can be a template or another | required |
| master_node_settings | object({ cores = | required | |
| node_pools | list(object({ name = st | Node pool definitions for the cluster. | required |
| authorized_keys_file | string | Path to file containing public SSH keys for remoting into nodes. | required |
| network_gateway | string | IP address of the network gateway. | required |
| nameserver | string | nameserver | "" |
| api_hostnames | list(string) | Alternative hostnames for the API server. | [] |
| http_proxy | string | http_proxy | "" |
| k3s_disable_components | list(string) | List of components to disable. Ref: https://rancher.com/docs/k3s/latest/en/insta | [] |
| cluster_name | string | Name of the cluster used for prefixing cluster components (ie nodes). | "k3s" |
| proxmox_resource_pool | string | Resource pool name to use in proxmox to better organize nodes. | "" |
| master_nodes_count | number | Number of master nodes. | 2 |
k3s_db_passwordk3s_db_userroot_db_passwordmaster_node_ipsk3s_server_tokenk3s_kubeconfigk3s_db_namek3s_db_hostsupport_node_ipsupport_node_userk3s_master_node_ips