import requests
url = "https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/upgrade-preflight"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/upgrade-preflight', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/upgrade-preflight \
--header 'Authorization: Bearer <token>'{
"blocks": 123,
"checked_at": "2023-11-07T05:31:56Z",
"checks": [
{
"check": "<string>",
"evidence": {},
"message": "<string>",
"overridable_with_force": true,
"status": "pass"
}
],
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"distribution": "<string>",
"requested_target_version": "<string>",
"target_version": "<string>",
"verdict": "ready",
"warnings": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Check Kubernetes upgrade readiness
Runs the read-only upgrade preflight for a hop to target_version: the hop plan per node, running operations and the operations block, PodDisruptionBudgets that would park a drain, CloudNativePG stopDelay and single-instance clusters, control-plane memory headroom from the cluster’s metrics source, restore points, control-plane SSH reachability and, on k3s, the address pin. Nothing is changed. The Kubernetes version upgrade runs the same preflight first and refuses on a block. Returns the cluster’s Kubernetes distribution with its current, desired and observed versions, whether any node still has to converge to the desired version, whether automatic patch upgrades are on, and the version of each node.
import requests
url = "https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/upgrade-preflight"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/upgrade-preflight', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/upgrade-preflight \
--header 'Authorization: Bearer <token>'{
"blocks": 123,
"checked_at": "2023-11-07T05:31:56Z",
"checks": [
{
"check": "<string>",
"evidence": {},
"message": "<string>",
"overridable_with_force": true,
"status": "pass"
}
],
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"distribution": "<string>",
"requested_target_version": "<string>",
"target_version": "<string>",
"verdict": "ready",
"warnings": 123
}{
"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
The Kubernetes version to check a hop to, e.g. v1.31.4 or v1.31.4+k3s1.
Response
The preflight report
The read-only Kubernetes upgrade preflight of a cluster for one target version. verdict is blocked when any check blocks, otherwise ready; a warning or a skipped check whose evidence could not be read was not checked, not passed.
Show child attributes
Show child attributes
The catalogue build the hop would install.
ready, blocked