Skip to main content
GET
/
api
/
v1
/
clusters
/
digitalocean
/
{cluster_id}
/
k8s-version
Get current Kubernetes version
import requests

url = "https://platform.ankra.app/api/v1/clusters/digitalocean/{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/digitalocean/{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/digitalocean/{cluster_id}/k8s-version \
--header 'Authorization: Bearer <token>'
{
  "current_version": "<string>",
  "distribution": "<string>",
  "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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

authorization
string | null
x-ankra-organisation-id
string | null

Path Parameters

cluster_id
string<uuid>
required

Response

Kubernetes version retrieved successfully

current_version
string | null
required
distribution
string
required
desired_version
string | null
nodes
K8sNodeVersion · object[]
observed_version
string | null
version_drift
boolean
default:false