GET /locations), so a rejected or mistyped token is refused immediately.
What Ankra Accesses
Hetzner clusters are self-managed: Ankra provisions the servers and networking with your token, then runs Kubernetes on top. The token is used for:
Hetzner API tokens are project-wide - there is no per-resource scoping in Hetzner’s token model, and a Read & Write token can manage everything in its project. Create the token in a project dedicated to Ankra-managed clusters if you want isolation from other workloads.
Creating a Hetzner API Credential
1
Get a Hetzner API token
- Log in to the Hetzner Console
- Select your project
- Go to Security → API Tokens
- Click Generate API Token with Read & Write permissions - a read-only token passes the save-time check but fails as soon as Ankra needs to create a server
- Copy the token (it’s only shown once)
2
Add to Ankra (UI)
Go to Credentials → Add → Hetzner, then provide:
- Name: a unique identifier - lowercase letters and numbers only, cannot start with a hyphen (e.g.
hetzner-prod) - API Token: the token from the previous step
3
Or via CLI
The token can be rotated later from the credential’s page without recreating the credential - everything using it picks up the new token automatically.
Listing Hetzner Credentials
Troubleshooting Hetzner Credentials
The table below covers the Test connection result in the Ankra UI:
Test connection verifies the token is accepted, not that it can write. If the credential saves fine but cluster provisioning later fails with a permissions error, the token is read-only - generate a Read & Write token and rotate it in on the credential’s page.