import requests
url = "https://platform.ankra.app/api/v1/clusters/upcloud"
payload = {
"credential_id": "<string>",
"name": "<string>",
"ssh_key_credential_id": "<string>",
"zone": "<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>',
name: '<string>',
ssh_key_credential_id: '<string>',
zone: '<string>'
})
};
fetch('https://platform.ankra.app/api/v1/clusters/upcloud', 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/upcloud \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credential_id": "<string>",
"name": "<string>",
"ssh_key_credential_id": "<string>",
"zone": "<string>"
}
'{
"cluster_id": "<string>",
"name": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create an UpCloud cluster
import requests
url = "https://platform.ankra.app/api/v1/clusters/upcloud"
payload = {
"credential_id": "<string>",
"name": "<string>",
"ssh_key_credential_id": "<string>",
"zone": "<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>',
name: '<string>',
ssh_key_credential_id: '<string>',
zone: '<string>'
})
};
fetch('https://platform.ankra.app/api/v1/clusters/upcloud', 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/upcloud \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credential_id": "<string>",
"name": "<string>",
"ssh_key_credential_id": "<string>",
"zone": "<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
Container network. Omitted resolves to cilium on kubeadm (the default distribution) and flannel on k3s.
flannel, calico, cilium production, staging, development, disposable 1 - 50Derived when omitted: wireguard_mesh for a multi-zone pool, private_network otherwise. Set wireguard_mesh on a single-zone cluster to make it mesh-capable so zones can be added later; a mesh cannot be retrofitted.
private_network, wireguard_mesh Show child attributes
Show child attributes
Zone pool for a multi-zone cluster. Must contain zone (the primary zone: bastion, first control plane and default network). Each additional zone gets its own SDN router, private network and NAT gateway, and the nodes are joined by a platform-managed WireGuard mesh. More than one zone needs at least three zones and three control planes. Omitted keeps the cluster in zone only.