Skip to main content

nodepools

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

Overview​

Namenodepools
TypeResource
Idovh.cloud_kube.nodepools

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstringNodePool ID
namestringNodePool resource name
project_idstringProject id (wire: projectId)
anti_affinitybooleanEnable anti affinity groups for nodes in the pool (wire: antiAffinity)
attach_floating_ipsobjectParameters for optional node exposition via a floating IP per node (wire: attachFloatingIps)
autoscalebooleanEnable auto-scaling for the pool
autoscalingobjectAutoscaling customization parameters
availability_zonesarrayList of availability zones where nodes will be created (only 1 zone is supported for now) (wire: availabilityZones)
available_nodesintegerNumber of nodes which are actually ready in the pool (wire: availableNodes)
created_atstring (date-time)Creation date (wire: createdAt)
current_nodesintegerNumber of nodes present in the pool (wire: currentNodes)
desired_nodesintegerNumber of nodes you desire in the pool (wire: desiredNodes)
flavorstringFlavor name
max_nodesintegerNumber of nodes you desire in the pool (wire: maxNodes)
min_nodesintegerNumber of nodes you desire in the pool (wire: minNodes)
monthly_billedbooleanEnable monthly billing on all nodes in the pool (wire: monthlyBilled)
size_statusstringStatus describing the state between number of nodes wanted and available ones (CAPACITY_OK, OVER_CAPACITY, UNDER_CAPACITY) (wire: sizeStatus)
statusstringCurrent status (DELETED, DELETING, DOWNSCALING, ERROR, INSTALLING, MAINTENANCE, READY, REDEPLOYING, REOPENING, RESETTING, SUSPENDED, SUSPENDING, UNKNOWN, UPDATING, UPSCALING, USER_ERROR, USER_NODE_NOT_FOUND_ERROR, USER_NODE_SUSPENDED_SERVICE, USER_QUOTA_ERROR, USER_WEBHOOK_PREVENTING_OPERATIONS_ERROR)
templateobjectTemplate of nodes metadata and spec to create in the pool
up_to_date_nodesintegerNumber of nodes with latest version installed in the pool (wire: upToDateNodes)
updated_atstring (date-time)Last update date (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectkube_id, node_pool_id, service_nameGet information on a specific nodepool on your cluster
listselectkube_id, service_nameList your nodepools
createinsertkube_id, service_name, flavor_nameCreate a nodepool on your cluster
updateupdatekube_id, node_pool_id, service_nameUpdate your nodepool information
deletedeletekube_id, node_pool_id, service_nameDelete a nodepool from your cluster

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"}})
kube_idstringKube ID (wire: kubeId)
node_pool_idstringNode pool ID (wire: nodePoolId)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.

SELECT examples​

Get information on a specific nodepool on your cluster

SELECT
id,
name,
project_id,
anti_affinity,
attach_floating_ips,
autoscale,
autoscaling,
availability_zones,
available_nodes,
created_at,
current_nodes,
desired_nodes,
flavor,
max_nodes,
min_nodes,
monthly_billed,
size_status,
status,
template,
up_to_date_nodes,
updated_at
FROM ovh.cloud_kube.nodepools
WHERE kube_id = '{{ kube_id }}' -- required
AND node_pool_id = '{{ node_pool_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Create a nodepool on your cluster

INSERT INTO ovh.cloud_kube.nodepools (
anti_affinity,
attach_floating_ips,
autoscale,
autoscaling,
availability_zones,
desired_nodes,
flavor_name,
max_nodes,
min_nodes,
monthly_billed,
name,
template,
kube_id,
service_name
)
SELECT
{{ anti_affinity }},
'{{ attach_floating_ips }}',
{{ autoscale }},
'{{ autoscaling }}',
'{{ availability_zones }}',
{{ desired_nodes }},
'{{ flavor_name }}' /* required */,
{{ max_nodes }},
{{ min_nodes }},
{{ monthly_billed }},
'{{ name }}',
'{{ template }}',
'{{ kube_id }}',
'{{ service_name }}'
RETURNING
id,
name,
project_id,
anti_affinity,
attach_floating_ips,
autoscale,
autoscaling,
availability_zones,
available_nodes,
created_at,
current_nodes,
desired_nodes,
flavor,
max_nodes,
min_nodes,
monthly_billed,
size_status,
status,
template,
up_to_date_nodes,
updated_at
;

UPDATE examples​

Update your nodepool information

UPDATE ovh.cloud_kube.nodepools
SET
attach_floating_ips = '{{ attach_floating_ips }}',
autoscale = {{ autoscale }},
autoscaling = '{{ autoscaling }}',
desired_nodes = {{ desired_nodes }},
max_nodes = {{ max_nodes }},
min_nodes = {{ min_nodes }},
nodes_to_remove = '{{ nodes_to_remove }}',
template = '{{ template }}'
WHERE
kube_id = '{{ kube_id }}' --required
AND node_pool_id = '{{ node_pool_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set;

DELETE examples​

Delete a nodepool from your cluster

DELETE FROM ovh.cloud_kube.nodepools
WHERE kube_id = '{{ kube_id }}' --required
AND node_pool_id = '{{ node_pool_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;