import requests
url = "https://platform.ankra.app/api/v1/clusters/managed/{provider}/{cluster_id}/node-pools/{node_pool_name}/replace"
payload = { "size": "<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({size: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/managed/{provider}/{cluster_id}/node-pools/{node_pool_name}/replace', 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/managed/{provider}/{cluster_id}/node-pools/{node_pool_name}/replace \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"size": "<string>"
}
'{
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"new_size": "<string>",
"node_pool_name": "<string>",
"old_size": "<string>",
"replacement_pool_name": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Replace a managed node pool with a new size
Bearer PAT authentication; RBAC permission clusters.write. Requests a blue/green replacement of the node pool with a new instance size: a scheduler job creates a replacement pool with the requested size (same count, labels, taints, zone, and autoscaling), waits for it to become ready, deletes the replaced pool, and rebinds the stored definition to the replacement pool’s deterministic name. No managed provider supports in-place pool resizing, so the 202 answer only accepts the intent.
import requests
url = "https://platform.ankra.app/api/v1/clusters/managed/{provider}/{cluster_id}/node-pools/{node_pool_name}/replace"
payload = { "size": "<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({size: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/managed/{provider}/{cluster_id}/node-pools/{node_pool_name}/replace', 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/managed/{provider}/{cluster_id}/node-pools/{node_pool_name}/replace \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"size": "<string>"
}
'{
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"new_size": "<string>",
"node_pool_name": "<string>",
"old_size": "<string>",
"replacement_pool_name": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.
Path Parameters
doks, uks, gke, ovh_mks, aks, eks, kapsule, ankracloud_k8s "kapsule"
Body
1Response
Replacement accepted
The platform operation that creates the replacement pool, waits for it to be ready and deletes the replaced one; poll it for the outcome.