Create a Hetzner cluster
import requests
url = "https://platform.ankra.app/api/v1/clusters/hetzner"
payload = {
"credential_id": "<string>",
"location": "<string>",
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({credential_id: '<string>', location: '<string>', name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/hetzner', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/clusters/hetzner \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credential_id": "<string>",
"location": "<string>",
"name": "<string>"
}
'{
"cluster_id": "<string>",
"name": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Hetzner Clusters
Create a Hetzner cluster
POST
/
api
/
v1
/
clusters
/
hetzner
Create a Hetzner cluster
import requests
url = "https://platform.ankra.app/api/v1/clusters/hetzner"
payload = {
"credential_id": "<string>",
"location": "<string>",
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({credential_id: '<string>', location: '<string>', name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/hetzner', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/clusters/hetzner \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credential_id": "<string>",
"location": "<string>",
"name": "<string>"
}
'{
"cluster_id": "<string>",
"name": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Minimum string length:
1Minimum string length:
1Omit to let the platform pick the cheapest x86 type the target location can currently provision that meets the role's minimum size.
Minimum string length:
1Container network. Omitted resolves to cilium on kubeadm (the default distribution) and flannel on k3s.
Available options:
flannel, calico, cilium Required range:
1 <= x <= 5Omit to let the platform pick the cheapest x86 type the target location can currently provision that meets the role's minimum size.
Minimum string length:
1Available options:
production, staging, development, disposable Required string length:
1 - 50Omit to let the platform pick the cheapest x86 type the target location can currently provision that meets the role's minimum size.
Show child attributes
Show child attributes
Required range:
0 <= x <= 50Omit to let the platform pick the cheapest x86 type the target location can currently provision that meets the role's minimum size.
Minimum string length:
1