The easiest and fastest way to create production-ready Kubernetes clusters on Hetzner Cloud
open sourceMITself-hostablefree
hetzner-k3s is a single-binary CLI, written in Crystal by Vito Botta, that creates K3s clusters on Hetzner Cloud from one YAML file in a few minutes, with no Terraform, Packer, Ansible or management cluster, and without sending the Hetzner API token to anyone. hetzner-k3s create provisions servers (Ubuntu 24.04 by default, configurable), a private network, firewall and API load balancer, and installs Hetzner's cloud controller manager and CSI driver, system-upgrade-controller and the Cluster Autoscaler for worker pools. An HA control plane uses embedded etcd on an odd number of masters, optionally across locations; hetzner-k3s upgrade rolls out a new k3s version. MIT, maintained by one developer.
Problems it solves
- create a production-ready Kubernetes cluster on Hetzner Cloud in a couple of minutes from my laptop
- spin up k3s on Hetzner without learning Terraform or running a management cluster
- keep my Hetzner API token on my own machine instead of giving it to a managed Kubernetes service
- describe a whole Kubernetes cluster on Hetzner in one YAML file I can commit to git
- run three Kubernetes masters with embedded etcd across Falkenstein, Nuremberg and Helsinki
- scale Hetzner worker pools automatically with demand between a minimum and maximum node count
- upgrade k3s on every node in my Hetzner cluster one at a time with a single command
- build a 500-node Kubernetes cluster on Hetzner Cloud quickly
- get Hetzner load balancers and volumes working in a fresh k3s cluster without manual setup
- spin up throwaway Kubernetes test clusters on cheap Hetzner Arm servers
- back up etcd snapshots of my Hetzner k3s cluster to S3
- run a Hetzner k3s cluster whose nodes have no public IPs
- turn a single-master dev cluster on Hetzner into a highly available one
- pay only for the Hetzner servers, with no Kubernetes platform fee on top
Features
- One YAML config file and one command (hetzner-k3s create); HCLOUD_TOKEN environment variable supported
- HA control plane with embedded etcd (default datastore) or an external datastore (etcd, PostgreSQL, MySQL)
- Masters across locations for regional clusters (eu-central network zone)
- Etcd snapshot backups to S3
- Installs Hetzner Cloud Controller Manager, Hetzner CSI driver, System Upgrade Controller and Cluster Autoscaler
- Static and autoscaled worker pools with min and max instances, labels and taints
- hetzner-k3s upgrade rolls a new k3s version through masters, then workers, with system-upgrade-controller
- Default image ubuntu-24.04, configurable per pool (e.g. rocky-9, debian), or a custom snapshot
- Flannel or Cilium CNI; Traefik, ServiceLB and metrics-server as optional add-ons
- Private networking by default; Hetzner firewall per cluster; private clusters without a public interface
View 3 more
- Tailscale integration, floating IP egress and an embedded registry mirror option
- x86 and Arm (CAX) instance types; tested with 500 nodes
- reconcile_node_pools drains and deletes nodes when a pool shrinks or is removed
Limitations
- Doesn't support IPv6-only public networking: with IPv4 off you must run it from a machine on the cluster's private network or VPN1
- No native Windows build: on Windows the docs say to run the Linux binary under WSL2
- Can't spread masters across locations outside the EU: regional clusters are only available in the eu-central network zone3
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what hetzner-k3s does.
- kube-hetzner Optimized and maintenance-free Kubernetes on Hetzner Cloud in one command
- Syself Autopilot Fully managed Kubernetes on your own Hetzner servers
- Cluster API Provider Hetzner Manage Kubernetes clusters on Hetzner, fully declarative, Kubernetes-native and with self-healing
- kOps The easiest way to get a production grade Kubernetes cluster up and running
- Edka Kubernetes platform in your own cloud account for apps, databases and agents
- Cloudfleet Managed Kubernetes from datacenter to cloud to edge
