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>"
}
]
}DigitalOcean Clusters
Create a DigitalOcean cluster
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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Container network. Omitted resolves to cilium on kubeadm (the default distribution) and flannel on k3s.
Available options:
flannel, calico, cilium Available options:
production, staging, development, disposable Required string length:
1 - 50Show child attributes
Show child attributes