Terraform module to setup k3s cluster on Hetzner cloud
Heavily inspired by: https://github.com/vitobotta/hetzner-k3s
Thanks a lot!
- generate a ssh keypair (id_ssh) and place it in the root directory of your terraform
ssh-keygen -f ./id_ssh
- 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
- 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/
- Nodes use private network with wireguard backend for communication
- System Upgrade is scheduled after initial creation (doing nothing but not nice)
- Currently it is not possible to recreate the first main node because it is used for cluster initialization
- kubeconfig file will be written to ./kube_config.yml