managed_kubernetes
Creates, updates, deletes, gets or lists a managed_kubernetes resource.
Overview​
| Name | managed_kubernetes |
| Type | Resource |
| Id | ovh.public_cloud_kubernetes.managed_kubernetes |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier of the cluster |
checksum | string | Concurrency control hash of the target specification |
created_at | string (date-time) | Cluster creation timestamp (wire: createdAt) |
current_state | object | Actual cluster state (wire: currentState) |
current_tasks | array | In-progress asynchronous operations on the cluster (wire: currentTasks) |
resource_status | string | Current lifecycle status of the cluster (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus) |
target_spec | object | Desired cluster specification (wire: targetSpec) |
updated_at | string (date-time) | Last cluster modification timestamp (wire: updatedAt) |
A managed Kubernetes cluster
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier of the cluster |
checksum | string | Concurrency control hash of the target specification |
created_at | string (date-time) | Cluster creation timestamp (wire: createdAt) |
current_state | object | Actual cluster state (wire: currentState) |
current_tasks | array | In-progress asynchronous operations on the cluster (wire: currentTasks) |
resource_status | string | Current lifecycle status of the cluster (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus) |
target_spec | object | Desired cluster specification (wire: targetSpec) |
updated_at | string (date-time) | Last cluster modification timestamp (wire: updatedAt) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | managed_kubernetes_id, project_id | Get a managed Kubernetes cluster (Beta version) | |
list | select | project_id | x_pagination_cursor, x_pagination_size | List managed Kubernetes clusters (Beta version) |
create | insert | project_id, target_spec | Create a managed Kubernetes cluster (Beta version) | |
update | update | managed_kubernetes_id, project_id, target_spec | Update a managed Kubernetes cluster (Beta version) | |
delete | delete | managed_kubernetes_id, project_id | Delete a managed Kubernetes cluster (Beta version) | |
restart | exec | managedKubernetesId, project_id | Restart 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.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The 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"}}) |
managedKubernetesId | string (uuid) | Managed kubernetes ID |
managed_kubernetes_id | string (uuid) | Managed kubernetes ID (wire: managedKubernetesId) |
project_id | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
x_pagination_cursor | string | Pagination cursor (wire: X-Pagination-Cursor) |
x_pagination_size | integer | Pagination size (wire: X-Pagination-Size) |
SELECT examples​
- get
- list
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
;
List managed Kubernetes clusters (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 project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: managed_kubernetes
props:
- name: project_id
value: "{{ project_id }}"
description: Required parameter for the managed_kubernetes resource.
- name: target_spec
description: |
Desired cluster specification
value:
apiServer:
access:
authorizedIps:
rules:
- cidr: "{{ cidr }}"
admissionPlugins: "{{ admissionPlugins }}"
authentication:
oidc:
caContent: "{{ caContent }}"
clientId: "{{ clientId }}"
groupsClaim:
- "{{ groupsClaim }}"
groupsPrefix: "{{ groupsPrefix }}"
issuerUrl: "{{ issuerUrl }}"
requiredClaim:
- "{{ requiredClaim }}"
signingAlgs:
- "{{ signingAlgs }}"
usernameClaim: "{{ usernameClaim }}"
usernamePrefix: "{{ usernamePrefix }}"
type: "{{ type }}"
autoUpgrade:
patch:
enabled: {{ enabled }}
cni:
canal:
kubeProxy:
iptables:
minSyncPeriod: "{{ minSyncPeriod }}"
syncPeriod: "{{ syncPeriod }}"
ipvs:
minSyncPeriod: "{{ minSyncPeriod }}"
scheduler: "{{ scheduler }}"
syncPeriod: "{{ syncPeriod }}"
tcpFinTimeout: "{{ tcpFinTimeout }}"
tcpTimeout: "{{ tcpTimeout }}"
udpTimeout: "{{ udpTimeout }}"
mode: "{{ mode }}"
cilium:
clusterId: {{ clusterId }}
clusterMesh:
apiServer:
nodePort: {{ nodePort }}
serviceType: "{{ serviceType }}"
enabled: {{ enabled }}
hubble:
enabled: {{ enabled }}
relay:
enabled: {{ enabled }}
ui:
backendResources: "{{ backendResources }}"
enabled: {{ enabled }}
frontendResources: "{{ frontendResources }}"
type: "{{ type }}"
ipAllocationPolicy:
pods: "{{ pods }}"
services: "{{ services }}"
name: "{{ name }}"
network:
type: "{{ type }}"
vrack:
defaultEgress:
type: "{{ type }}"
userGateway:
ip: "{{ ip }}"
loadBalancerSubnetId: "{{ loadBalancerSubnetId }}"
privateNetworkId: "{{ privateNetworkId }}"
subnetId: "{{ subnetId }}"
plan: "{{ plan }}"
region: "{{ region }}"
version: "{{ version }}"
UPDATE examples​
- update
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
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
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 }}
}'
;