Skip to main content

available_upgrades

Creates, updates, deletes, gets or lists an available_upgrades resource.

Overview

Nameavailable_upgrades
TypeResource
Iddigitalocean.kubernetes.available_upgrades

Fields

The following fields are returned by SELECT queries:

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.

NameDatatypeDescription
kubernetes_versionstringThe upstream version string for the version of Kubernetes provided by a given slug. (example: 1.16.13)
slugstringThe slug identifier for an available version of Kubernetes for use when creating or updating a cluster. The string contains both the upstream version of Kubernetes as well as the DigitalOcean revision. (example: 1.16.13-do.0)
supported_featuresarrayThe features available with the version of Kubernetes provided by a given slug.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
kubernetes_get_available_upgradesselectcluster_idTo 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
cluster_idstring (uuid)A unique ID that can be used to reference a Kubernetes cluster. (example: bd5f5959-5e1e-4205-a714-a914373942af)

SELECT examples

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.

SELECT
kubernetes_version,
slug,
supported_features
FROM digitalocean.kubernetes.available_upgrades
WHERE cluster_id = '{{ cluster_id }}' -- required;