k3s

BerndDA/k3s/hcloud

Terraform Module HCL HCLOUD

Terraform module to setup k3s cluster on Hetzner cloud

Install
module "k3s" {
source = "BerndDA/k3s/hcloud"
version = "0.1.15"
}
plain text: /constructs/tfmod-berndda-k3s-hcloud/install.txt
⭐ Source on GitHub 📦 Registry page
README

terraform-hcloud-k3s Terraform module to setup k3s cluster on Hetzner cloud Heavily inspired by: https://github.com/vitobotta/hetzner-k3s Thanks a lot! Prerequisites - generate a ssh keypair (id_ssh) and place it in the root directory of your terraform - ssh-keygen -f ./id_ssh Resources created in Hetzner Cloud - Main nodes (controlplane) like defined in main_pool_config - Woker nodes like defined in worker_pool_config - Private network & subnet - Loadblancer for kubernetes API access - Firewall for all nodes Installed inside Cluster - Hetzner CSI - https://github.com/hetznercloud/csi-driver - Hetzner CCM - https://github.com/hetznercloud/hcloud-cloud-controller-manager - K3S Rancher System Upgrade Controller - https://rancher.com/docs/k3s/latest/en/upgrades/automated/ Remarks - Nodes use

Inputs (11)
NameTypeDescriptionDefault
hetzner_tokenstringHetzner cloud API token required
ssh_private_keystring required
ssh_public_keystring required
worker_pool_configobject({ num_nodes = numbeNumber and type of worker nodes{ "node_type": "cx21", "num_nodes":
cluster_namestringName of your cluster. Also used to pre/postfix resources"dev"
imagestringType of OS image used for all nodes"debian-11"
k3s_versionstringK3S version to install on the nodes"v1.24.1+k3s1"
locationstringLocation of all resources within Hetzner Cloud (fsn1|nbg1|hel1|ash)"nbg1"
ssh_filestringFile and Path to ssh key. If you want to create multiple clusters in the same pr"./id_ssh"
main_pool_configobject({ num_nodes = numbeNumber and type of main nodes{ "node_type": "cx11", "num_nodes":
kubeconfig_filestringFile and Path of kubeconfig file to write"./kube_config.yml"
Outputs (2)
k3s_token — the secret k3s token
api_loadbalancer_ip — the IP of the API loadbalancer
Details
FrameworkTerraform Module
LanguageHCL
Version0.1.15
Cloud HCLOUD
★ Stars1
Forks1
Total downloads538
Inputs11
Outputs2
Examples1
LicenseMIT
NamespaceBerndDA
Updated