Skip to main content
POST
/
api
/
v1
/
clusters
/
hetzner
Create a Hetzner cluster
import requests

url = "https://platform.ankra.app/api/v1/clusters/hetzner"

payload = {
    "name": "<string>",
    "credential_id": "<string>",
    "ssh_key_credential_id": "<string>",
    "location": "<string>"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "cluster_id": "<string>",
  "name": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

authorization
string | null

Body

application/json
name
string
required
credential_id
string<uuid4>
required
ssh_key_credential_id
string<uuid4>
required
location
string
required
description
string | null
network_ip_range
string
default:10.0.0.0/16
subnet_range
string
default:10.0.1.0/24
bastion_server_type
string
default:cx23
control_plane_count
integer
default:1
control_plane_server_type
string
default:cx33
worker_count
integer
default:1
worker_server_type
string
default:cx33
distribution
string
default:k3s
kubernetes_version
string | null

Response

Cluster created successfully

cluster_id
string<uuid4>
required
name
string
required