Modules in this repository help provision and maintain multi-region kubernetes clusters on hetzner.
- talos with kubespan, kubeprism and hostdns
- ipv6-only connectivity, with optional ipv4 private networks and load balancers (cilium requires additional configuration)
- single-stack, ipv6 internals (dual-stack possible with additional patches)
- cilium - direct routing (veth), bigtcp and bbr
- talos-ccm - handles cluster certificates and ipam (CloudAllocator)
- hcloud-csi - storage
- gcp-wif-webhook - links kubernetes and gcp service accounts
- hcloud-pool - allocates public ipv6 /64 blocks for all defined nodes and optionally private network and a load balancer
- talos-cluster - forms a talos cluster from previously defined node pools
- hcloud-apply - provisions servers with talos configs and sets up firewalls
- talos-apply - bootstraps the cluster and handles all future config changes
- gcp-wif - optional, manages gcp workload identity pool, service accounts and a bucket, it also generates talos config patch
- gcp-wif-apply - optional, downloads oidc files from the running cluster and stores them in the previously created bucket
See examples folder.
The following mermaid flowchart outlines the order of operations between different modules for a cluster, spanning two regions.
%%{init: {'theme': 'neutral' } }%%
graph TD
WIF[/gcp-wif/]
HPN[/hcloud-pool nbg/]
HPH[/hcloud-pool hel/]
TC[talos-cluster]
HAN[hcloud-apply nbg]
HAH[hcloud-apply hel]
TA[talos-apply]
WIFA[gcp-wif-apply]
HPN --> TC
HPN --> HAN
HPH --> TC
TC --> HAN
TC --> TA
TC --> HAH
HPH --> HAH
TC --> WIFA
TA --> WIFA
WIF --> WIFA
WIF --> TC
- clone the repo
- navigate to dev folder and run just to deploy the cluster
- navigate to base folder, open talos dashboard and wait for
[talos] created
messages
> TALOSCONFIG=talos-config talosctl -n c1 dashboard
- run
just
to generate all necessary yaml files - apply them individually,
talos-ccm
andcilium
are required
> KUBECONFIG=kube-config kubectl apply --server-side=true -f talos-ccm.yaml
> KUBECONFIG=kube-config kubectl apply --server-side=true -f cilium.yaml
...
- open talos dashboard again and wait for the message
[talos] machine is running and ready
. - to verify, open k9s
> KUBECONFIG=kube-config k9s