import requests
url = "https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/node-groups"
payload = {
"instance_type": "<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({instance_type: '<string>', name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/node-groups', 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/{cluster_id}/node-groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instance_type": "<string>",
"name": "<string>"
}
'{
"count": 123,
"group_name": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Add node group
Adds a worker node group with the given name, instance_type and count (default 1), plus optional labels, taints and autoscaling settings. By default the change runs in the background and the call answers 202 {"status": "accepted"} (409 if the same change is already in flight); pass wait=true to run it in the request and receive the result.
import requests
url = "https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/node-groups"
payload = {
"instance_type": "<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({instance_type: '<string>', name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/node-groups', 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/{cluster_id}/node-groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instance_type": "<string>",
"name": "<string>"
}
'{
"count": 123,
"group_name": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Body
OVH 3-AZ regions only: pin every node of this group to one availability zone (e.g. eu-west-par-b). Omitted spreads the group across the cluster's zones.
UpCloud multi-zone clusters only: pin every node of this group to one zone of the cluster's pool. Omitted spreads the group across the pool.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
OVH only: opaque cloud-init user data applied verbatim at first boot by every instance the group ever creates, replacements included. Max 65535 bytes.