To determine whether a cluster can be upgraded, and the versions to which it
can be upgraded, send a GET request to
/v2/kubernetes/clusters/$K8S_CLUSTER_ID/upgrades
.
Name | Type | Required | Description | Default Value |
---|---|---|---|---|
cluster_id |
string | True | A unique ID that can be used to reference a Kubernetes cluster. |
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
resp = client.kubernetes.get_available_upgrades(cluster_id="da8fda8")
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.
The response will be a JSON object with a key called
available_upgrade_versions
. The value of this will be an array of objects,
representing the upgrade versions currently available for this cluster.
If the cluster is up-to-date (i.e. there are no upgrades currently available)
available_upgrade_versions
will be null
.
Unauthorized
The resource was not found.
API Rate limit exceeded
Server error.
Unexpected error