Get current Kubernetes version
import requests
url = "https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}/k8s-version"
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/hetzner/{cluster_id}/k8s-version', 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/hetzner/{cluster_id}/k8s-version \
--header 'Authorization: Bearer <token>'{
"current_version": "<string>",
"distribution": "<string>",
"auto_patch_upgrade_enabled": false,
"desired_version": "<string>",
"nodes": [
{
"name": "<string>",
"role": "<string>",
"state": "<string>",
"desired_version": "<string>",
"observed_version": "<string>"
}
],
"observed_version": "<string>",
"version_drift": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Hetzner Clusters
Get current Kubernetes version
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.
GET
/
api
/
v1
/
clusters
/
hetzner
/
{cluster_id}
/
k8s-version
Get current Kubernetes version
import requests
url = "https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}/k8s-version"
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/hetzner/{cluster_id}/k8s-version', 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/hetzner/{cluster_id}/k8s-version \
--header 'Authorization: Bearer <token>'{
"current_version": "<string>",
"distribution": "<string>",
"auto_patch_upgrade_enabled": false,
"desired_version": "<string>",
"nodes": [
{
"name": "<string>",
"role": "<string>",
"state": "<string>",
"desired_version": "<string>",
"observed_version": "<string>"
}
],
"observed_version": "<string>",
"version_drift": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Kubernetes version retrieved successfully