Skip to main content
POST
/
api
/
v1
/
clusters
/
digitalocean
Create a DigitalOcean cluster
import requests

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

payload = {
    "credential_id": "<string>",
    "name": "<string>",
    "region": "<string>",
    "ssh_key_credential_id": "<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>',
region: '<string>',
ssh_key_credential_id: '<string>'
})
};

fetch('https://platform.ankra.app/api/v1/clusters/digitalocean', 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/digitalocean \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credential_id": "<string>",
"name": "<string>",
"region": "<string>",
"ssh_key_credential_id": "<string>"
}
'
{
  "cluster_id": "<string>",
  "name": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

Authorization
string
header
required

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

Headers

authorization
string | null
x-ankra-organisation-id
string | null

Body

application/json
credential_id
string<uuid4>
required
name
string
required
region
string
required
ssh_key_credential_id
string<uuid4>
required
bastion_size
string
default:s-1vcpu-1gb
cni
enum<string>
default:flannel
Available options:
flannel,
calico,
cilium
control_plane_count
integer
default:1
control_plane_size
string
default:s-2vcpu-4gb
description
string | null
distribution
string
default:k3s
etcd_node_count
integer
default:3
etcd_size
string
default:s-2vcpu-4gb
etcd_topology
string
default:stacked
external_cloud_provider
boolean
default:true
gitops_branch
string
default:master
gitops_credential_name
string | null
gitops_repository
string | null
include_networking
boolean
default:true
kubernetes_version
string | null
network_ip_range
string | null
node_groups
CreateDigitaloceanNodeGroupRequest · object[] | null
worker_count
integer
default:1
worker_size
string
default:s-2vcpu-4gb

Response

Cluster created successfully

cluster_id
string<uuid4>
required
name
string
required