Skip to main content

managed_kubernetes

Creates, updates, deletes, gets or lists a managed_kubernetes resource.

Overview​

Namemanaged_kubernetes
TypeResource
Idovh.public_cloud_kubernetes.managed_kubernetes

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Unique identifier of the cluster
checksumstringConcurrency control hash of the target specification
created_atstring (date-time)Cluster creation timestamp (wire: createdAt)
current_stateobjectActual cluster state (wire: currentState)
current_tasksarrayIn-progress asynchronous operations on the cluster (wire: currentTasks)
resource_statusstringCurrent lifecycle status of the cluster (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus)
target_specobjectDesired cluster specification (wire: targetSpec)
updated_atstring (date-time)Last cluster modification timestamp (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectmanaged_kubernetes_id, project_idGet a managed Kubernetes cluster (Beta version)
listselectproject_idx_pagination_cursor, x_pagination_sizeList managed Kubernetes clusters (Beta version)
createinsertproject_id, target_specCreate a managed Kubernetes cluster (Beta version)
updateupdatemanaged_kubernetes_id, project_id, target_specUpdate a managed Kubernetes cluster (Beta version)
deletedeletemanaged_kubernetes_id, project_idDelete a managed Kubernetes cluster (Beta version)
restartexecmanagedKubernetesId, project_idRestart the control plane of a managed Kubernetes cluster (Beta version)

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
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
managedKubernetesIdstring (uuid)Managed kubernetes ID
managed_kubernetes_idstring (uuid)Managed kubernetes ID (wire: managedKubernetesId)
project_idstringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Get a managed Kubernetes cluster (Beta version)

SELECT
id,
checksum,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at
FROM ovh.public_cloud_kubernetes.managed_kubernetes
WHERE managed_kubernetes_id = '{{ managed_kubernetes_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Create a managed Kubernetes cluster (Beta version)

INSERT INTO ovh.public_cloud_kubernetes.managed_kubernetes (
target_spec,
project_id
)
SELECT
'{{ target_spec }}' /* required */,
'{{ project_id }}'
RETURNING
id,
checksum,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at
;

UPDATE examples​

Update a managed Kubernetes cluster (Beta version)

UPDATE ovh.public_cloud_kubernetes.managed_kubernetes
SET
checksum = '{{ checksum }}',
target_spec = '{{ target_spec }}'
WHERE
managed_kubernetes_id = '{{ managed_kubernetes_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
AND target_spec = '{{ target_spec }}' --required
RETURNING
id,
checksum,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at;

DELETE examples​

Delete a managed Kubernetes cluster (Beta version)

DELETE FROM ovh.public_cloud_kubernetes.managed_kubernetes
WHERE managed_kubernetes_id = '{{ managed_kubernetes_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Restart the control plane of a managed Kubernetes cluster (Beta version)

EXEC ovh.public_cloud_kubernetes.managed_kubernetes.restart
@managedKubernetesId='{{ managedKubernetesId }}' --required,
@project_id='{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"force": {{ force }}
}'
;