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, named by replacement_pool_name when the request gives one and deterministically from the pool and size otherwise; the answer carries the 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
1Optional name for the replacement pool, validated like the name of an added pool (a Kubernetes label value: at most 63 letters, digits, '-', '_' or '.', beginning and ending with a letter or digit). A name another pool of the cluster holds, or an in-flight replacement will take, is refused with 409 "Node pool already exists". Absent or null, the platform derives a deterministic name from the pool and the new size. Retries: while the earlier replacement of this pool is still pending, a repeat answers 409 "Node pool replacement is already in progress"; once the earlier attempt has failed (or its lease expired) a repeat with the same name and exactly the same size resumes it, and the same name with any other size is refused with 409; after a replacement completed the replaced pool no longer exists, so a repeat answers 404.
1 - 63Response
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.