managed_kubernetes_nodepools
Creates, updates, deletes, gets or lists a managed_kubernetes_nodepools resource.
Overview​
| Name | managed_kubernetes_nodepools |
| Type | Resource |
| Id | ovh.public_cloud_kubernetes.managed_kubernetes_nodepools |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier of the nodepool |
checksum | string | Concurrency control hash of the target specification |
created_at | string (date-time) | Nodepool creation timestamp (wire: createdAt) |
current_state | object | Actual nodepool state (wire: currentState) |
current_tasks | array | In-progress asynchronous operations on the nodepool (wire: currentTasks) |
resource_status | string | Current lifecycle status of the nodepool (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus) |
target_spec | object | Desired nodepool specification (wire: targetSpec) |
updated_at | string (date-time) | Last nodepool modification timestamp (wire: updatedAt) |
A nodepool of a managed Kubernetes cluster
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier of the nodepool |
checksum | string | Concurrency control hash of the target specification |
created_at | string (date-time) | Nodepool creation timestamp (wire: createdAt) |
current_state | object | Actual nodepool state (wire: currentState) |
current_tasks | array | In-progress asynchronous operations on the nodepool (wire: currentTasks) |
resource_status | string | Current lifecycle status of the nodepool (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus) |
target_spec | object | Desired nodepool specification (wire: targetSpec) |
updated_at | string (date-time) | Last nodepool 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, node_pool_id, project_id | Get a nodepool of a managed Kubernetes cluster (Beta version) | |
list | select | managed_kubernetes_id, project_id | x_pagination_cursor, x_pagination_size | List nodepools of a managed Kubernetes cluster (Beta version) |
create | insert | managed_kubernetes_id, project_id, target_spec | Create a nodepool in a managed Kubernetes cluster (Beta version) | |
update | update | managed_kubernetes_id, node_pool_id, project_id, target_spec | Update a nodepool of a managed Kubernetes cluster (Beta version) | |
delete | delete | managed_kubernetes_id, node_pool_id, project_id | Delete a nodepool 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"}}) |
managed_kubernetes_id | string (uuid) | Managed kubernetes ID (wire: managedKubernetesId) |
node_pool_id | string (uuid) | Node pool ID (wire: nodePoolId) |
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 nodepool of 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_nodepools
WHERE managed_kubernetes_id = '{{ managed_kubernetes_id }}' -- required
AND node_pool_id = '{{ node_pool_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
List nodepools of 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_nodepools
WHERE managed_kubernetes_id = '{{ managed_kubernetes_id }}' -- required
AND 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 nodepool in a managed Kubernetes cluster (Beta version)
INSERT INTO ovh.public_cloud_kubernetes.managed_kubernetes_nodepools (
target_spec,
managed_kubernetes_id,
project_id
)
SELECT
'{{ target_spec }}' /* required */,
'{{ managed_kubernetes_id }}',
'{{ 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_nodepools
props:
- name: managed_kubernetes_id
value: "{{ managed_kubernetes_id }}"
description: Required parameter for the managed_kubernetes_nodepools resource.
- name: project_id
value: "{{ project_id }}"
description: Required parameter for the managed_kubernetes_nodepools resource.
- name: target_spec
description: |
Desired nodepool specification
value:
antiAffinity:
enabled: {{ enabled }}
policy: "{{ policy }}"
autoscaler:
enabled: {{ enabled }}
maxNodes: {{ maxNodes }}
minNodes: {{ minNodes }}
scaleDown:
unneededTimeSeconds: {{ unneededTimeSeconds }}
unreadyTimeSeconds: {{ unreadyTimeSeconds }}
utilizationThreshold: {{ utilizationThreshold }}
availabilityZone: "{{ availabilityZone }}"
billingType: "{{ billingType }}"
desiredNodes: {{ desiredNodes }}
name: "{{ name }}"
nodeConfig:
attachFloatingIp:
enabled: {{ enabled }}
flavor: "{{ flavor }}"
template:
metadata:
annotations: "{{ annotations }}"
finalizers:
- "{{ finalizers }}"
labels: "{{ labels }}"
spec:
taints:
- effect: "{{ effect }}"
key: "{{ key }}"
value: "{{ value }}"
unschedulable: {{ unschedulable }}
UPDATE examples​
- update
Update a nodepool of a managed Kubernetes cluster (Beta version)
UPDATE ovh.public_cloud_kubernetes.managed_kubernetes_nodepools
SET
checksum = '{{ checksum }}',
target_spec = '{{ target_spec }}'
WHERE
managed_kubernetes_id = '{{ managed_kubernetes_id }}' --required
AND node_pool_id = '{{ node_pool_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 nodepool of a managed Kubernetes cluster (Beta version)
DELETE FROM ovh.public_cloud_kubernetes.managed_kubernetes_nodepools
WHERE managed_kubernetes_id = '{{ managed_kubernetes_id }}' --required
AND node_pool_id = '{{ node_pool_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;