Skip to main content
Reference material for Hetzner clusters: every configuration parameter, datacenter location, and the details of the infrastructure Ankra provisions.

Cluster Configuration Options

Hetzner Locations


Node Group API

Node Actions API

See Restarting a Node and Resizing the Bastion or Gateway for usage examples and response shapes.

SSH Key API


Architecture

A Hetzner cluster provisions the following infrastructure: All nodes are deployed within a private Hetzner network and have no public IPs. The bastion host plays two roles:
  • SSH jump host - Ankra provisions and manages nodes through it, and it is the entry point for ssh -J access.
  • NAT gateway - a network route sends the nodes’ default traffic (0.0.0.0/0) to the bastion, which masquerades it out through its public IP. All node egress - image pulls, package installs, and the Ankra Agent’s outbound connection - flows through the bastion.
Because the bastion is the egress path on Hetzner, stopping or deleting it cuts off internet access for every node in the cluster. This differs from OVH clusters, where egress uses a provider-managed gateway and the bastion is only a jump host.
Inbound traffic to workloads does not pass through the bastion: LoadBalancer services get Hetzner Load Balancers from the CCM, attached to nodes over the private network.

Automatic Cloud Integration (hcloud Stack)

Ankra automatically deploys a hcloud stack during cluster provisioning. This stack includes:
  1. hcloud namespace - dedicated namespace for Hetzner cloud components
  2. hcloud-token secret - contains your Hetzner API token and network ID, sourced from the credential used to create the cluster
  3. hcloud-cloud-controller-manager - integrates the cluster with Hetzner Cloud APIs (node metadata, load balancers, node lifecycle)
  4. hcloud-csi - provides persistent storage using Hetzner Cloud Volumes
The hcloud stack is deployed automatically after the Ankra Agent is installed. The CCM and CSI charts both depend on the hcloud-token secret, and Ankra ensures the correct dependency order.
You do not need to manually set up the CCM or CSI driver - they are provisioned as part of cluster creation using the same Hetzner API credential you provided.

External Cloud Provider

Hetzner clusters are provisioned with --kubelet-arg=cloud-provider=external and --disable-cloud-controller. This configures k3s to delegate node initialization to the Hetzner Cloud Controller Manager. When nodes first join the cluster, they carry a node.cloudprovider.kubernetes.io/uninitialized taint that prevents workload scheduling. The CCM removes this taint after initializing each node with its Hetzner provider ID, zone labels, and instance metadata. The Ankra Agent tolerates this taint so it can schedule immediately and begin managing the cluster before the CCM is fully running.

Hetzner Cloud Controller Manager (hcloud-ccm)

The Hetzner Cloud Controller Manager is automatically deployed as part of the hcloud stack and provides:
  • Node metadata - automatic zone, region, and instance type labels on nodes
  • Load Balancers - Kubernetes LoadBalancer services backed by Hetzner Cloud Load Balancers
  • Node lifecycle - automatic removal of deleted nodes from the cluster
  • Route management - pod network routes via Hetzner Cloud Networks
The CCM is deployed in the hcloud namespace with 3 replicas and a PodDisruptionBudget. It reads the Hetzner API token from the hcloud-token secret that Ankra creates automatically.

CCM Configuration

The default CCM values configured by Ankra:
To customize the CCM configuration after creation, edit the hcloud-cloud-controller-manager addon in the hcloud stack via the Stack Builder.
The CCM creates Hetzner Cloud Load Balancers when you create Kubernetes Service resources of type LoadBalancer. These Load Balancers are managed by Hetzner Cloud, not by Ankra. Delete LoadBalancer services before terminating the cluster to avoid orphaned resources and unexpected charges.

Hetzner CSI Driver (hcloud-csi)

The Hetzner CSI Driver is automatically deployed as part of the hcloud stack and provides:
  • Dynamic provisioning - create Hetzner Cloud Volumes on demand via PersistentVolumeClaim
  • Volume expansion - resize volumes without downtime
  • Storage classes - hcloud-volumes StorageClass available out of the box

CSI Configuration

The default CSI values configured by Ankra:
Once deployed, create PersistentVolumeClaims with storageClassName: hcloud-volumes:
The CSI driver creates Hetzner Cloud Volumes when you create PersistentVolumeClaims using the hcloud-volumes StorageClass. These Volumes are managed by Hetzner Cloud, not by Ankra. The default reclaimPolicy is Retain, meaning Hetzner Volumes are not deleted when PVCs are removed. Delete PVCs and their backing Hetzner Volumes before terminating the cluster to avoid orphaned resources and unexpected charges.

Ingress Stack (Optional)

When include_ingress is enabled during cluster creation, Ankra deploys an ingress stack alongside the hcloud stack. The ingress stack includes:
  1. ingress-nginx - NGINX-based Ingress controller with a Hetzner Cloud Load Balancer
  2. cert-manager - automated TLS certificate management
  3. Let’s Encrypt ClusterIssuer - a letsencrypt-prod ClusterIssuer configured for HTTP-01 validation

Ingress Configuration

The ingress-nginx controller is pre-configured with Hetzner Load Balancer annotations:
cert-manager is deployed with CRDs enabled and 2 replicas:

Using Ingress with TLS

Once the ingress stack is deployed, create Ingress resources with automatic TLS:
Point your DNS record for app.example.com to the Hetzner Load Balancer IP (created automatically by ingress-nginx). cert-manager will handle the Let’s Encrypt certificate issuance and renewal.