Creating a Hetzner cluster on Ankra
Before you start
- A Hetzner Cloud API token with read and write permissions, stored as a Hetzner credential. No Hetzner account yet? Sign up for Hetzner Cloud.
- One or more SSH key credentials - your own public key, or one Ankra generates. See SSH Key Credentials.
- Room in your Hetzner project’s limits for the servers, a network and the SSH keys. Check them in the Hetzner Console; Hetzner support raises them.
Create the cluster
- Dashboard
- CLI
- API
1
Open the create dialog
Go to Clusters, click Create cluster and pick Hetzner under Ankra Managed.
2
Credential & Region
Pick the Hetzner credential (or add one inline), one or more SSH keys, and the location, for example
fsn1, nbg1 or hel1.3
Network & Compute
Keep or change the private network ranges, then pick the bastion server type, the control plane count and server type (for example
cpx32), and one or more worker node groups. The wizard shows each server type’s price and which types the location can provision right now. If a preselected type is out of stock there, the wizard moves to the cheapest available type that is at least as large.4
Kubernetes
Keep kubeadm (the default, with Cilium) or pick k3s, and optionally the version. See Choices fixed at create time for the CNI and etcd options.
5
GitOps
Optionally connect a Git repository; Ankra commits the cluster’s stacks to it. Two checkboxes are on by default:
- Include Networking Stack - Traefik, cert-manager and a Let’s Encrypt ClusterIssuer, with Traefik behind a Hetzner Load Balancer.
- Include Public DNS - a delegated subdomain on
ankra.ccwith external-dns wired, so an ingress hostname under it gets its DNS record and TLS certificate automatically.
6
Details
Name the cluster, set its environment, and click Create cluster. A progress view follows the network, bastion, servers, Kubernetes installation and Ankra Agent.
Verify
- The cluster moves from Provisioning to Online in the clusters list once the Ankra Agent has connected.
-
Point
kubectlat it through Ankra (this needs a Cluster Access grant) and check the nodes:Every control plane and worker should beReady. See Accessing Clusters with kubectl.
What Ankra created in your project
- A private network that every server joins. Nodes have private addresses only.
- A bastion - the only server with a public IP. It is the SSH jump host and also the NAT gateway for all node egress, so stopping or deleting it cuts the nodes off from the internet.
- Control plane and worker servers, and your SSH keys registered in the project.
- The hcloud stack in the
hcloudnamespace: the Hetzner cloud controller manager (Load Balancers forLoadBalancerServices, node metadata) and the CSI driver (Hetzner Volumes through thehcloud-volumesStorageClass), both using your credential’s token.
Server types
Hetzner’s stock of a server type changes by location and by hour. The cost-optimisedcx line is sold in limited quantities: on 2026-10-01 fsn1 could provision cx23 but not cx33, cx43 or cx53, while cpx22, cpx32 and the other cpx and ccx types were available. A type that is out of stock is refused when you create the cluster, add a node group, or resize one, so check what a location sells right now with ankra cluster hetzner server-types --credential-id <hetzner-credential-id> --location fsn1 --available-only rather than relying on that example.
- Leave a server type out and Ankra picks it when the cluster is created, from what the location can provision at that moment: the cheapest x86 type with at least 2 vCPU and 4 GB for the bastion and workers, and at least 4 vCPU and 8 GB for the control plane and dedicated etcd nodes. Out-of-stock and deprecated types are skipped. The create response and the AI’s create result name the type each role got.
- Name a type and Ankra checks it against the location first. If the location cannot provision it, the create is refused with the types of at least that size it can provision instead, cheapest first.
- For a node group that autoscales, pick a type the location sells reliably. Each scale-up orders a new server of the group’s type, so a group on a type that goes out of stock cannot grow until it is back.
Hetzner specifics
- Disk growth is irreversible. Moving a node group to a larger server type enlarges each server’s disk, which Hetzner cannot shrink, so a group can never move back to a smaller type. Each node is powered off, resized and powered on, with brief downtime for its workloads. For smaller nodes, create a new group and delete the old one.
- Restart is a native reboot, falling back to a power cycle when the server does not respond.
- SSH keys are shared by fingerprint. Hetzner registers a public key once per project, so a key used on several Ankra Hetzner clusters is one Hetzner key object, and terminating any of those clusters deletes it. Running nodes keep working (their
authorized_keysare already written), and the next key sync registers it again. - What a terminate touches. Servers, the network and SSH keys are deleted by the IDs Ankra recorded - Ankra never lists your project and deletes what it finds. Just before the network is deleted, three scoped sweeps run: servers carrying this cluster’s
ankra-cluster-idlabel and attached to its network, volumes carrying that label, and Load Balancers attached to its network or carrying that label. That last filter is a union, so a Load Balancer you attached to the cluster’s network by hand is removed too. Load Balancers are deleted on every terminate, because an attached one blocks the network delete. Your Hetzner API token is never touched. - Keeping a volume. A Hetzner Volume labelled
ankra-retainis kept when the cluster is terminated.
Operate it
Day-2 tasks work the same way on every Ankra Managed provider, with the CLI namehetzner:
- Node groups and legacy worker scaling
- Control plane
- Restart a node and the bastion
- SSH access and keys
- Upgrade Kubernetes
- Stop and start
- Terminate a cluster