Skip to content

aigisuk/terraform-hcloud-k3s

Repository files navigation

Terraform Hetzner Cloud K3S Module

An opinionated Terraform module to provision a high availability K3s cluster with embedded etcd on the Hetzner Cloud platform. Perfect for development/testing or production workloads.

Inputs

Name Description Type Default Required
hcloud_token Hetzner Cloud API Token string n/a yes
ssh_private_key SSH private Key string n/a yes
ssh_public_key SSH Public Key string n/a yes
agent_nodepools Configure Agent nodepools list(any) [] no
flannel_backend Flannel Backend Type. Valid options include vxlan (default), ipsec, wireguard or wireguard-native string "vxlan" no
install_cert_manager Pre-install cert-manager? bool false no
k3s_channel K3s release channel. 'stable', 'latest', 'testing' or a specific channel or version e.g. 'v1.20', 'v1.21.0+k3s1' string "stable" no
k3s_network_range Range of IP addresses for the network in CIDR notation. Must be one of the private ipv4 ranges of RFC1918 string "10.0.0.0/8" no
k8s_dashboard Pre-install the Kubernetes Dashboard? bool false no
location Location in which to provision the cluster. Default is nbg1 (Nuremberg, Germany) string "nbg1" no
server_count Number of server (master) nodes to provision number 3 no
server_taint_criticalonly Allow only critical addons to be scheduled on servers? bool true no
ssh_public_key_name SSH Public Key Name string "default" no
sys_upgrade_ctrl Pre-install the System Upgrade Controller? bool false no

Outputs

Name Description
kubeconfig Cluster default kubeconfig
local_agent_nodepools Configuration of provisioned agent nodepools