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.
Before you start
- A role with
credentials.write(the built-inownerandadminroles have it). See Credentials.
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 it to Ankra
- Portal
- CLI
Go to Integrations & alerts → Credentials, click Add credential, and under Cloud providers choose Hetzner Cloud. Enter:
- Name: 3 to 100 lowercase letters, digits and single hyphens (for example
hetzner-prod). It cannot change later. - API token: the token from the previous step
Replace the token, or add Object Storage keys
Open the credential, click Settings & access, and use Replace the secret (see Replace the secret). It has three fields; leave a field empty to keep what is stored for it:- New API token: a new Hetzner Cloud API token.
- New object Storage access key and New object Storage secret key: only if backups go to Hetzner Object Storage. Give the two together.
Listing Hetzner Credentials
Troubleshooting Hetzner Credentials
These are the answers Test the connection and Check now give:
The check 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 replace it on the credential’s page.