nodepools
Creates, updates, deletes, gets or lists a nodepools resource.
Overview​
| Name | nodepools |
| Type | Resource |
| Id | ovh.cloud_kube.nodepools |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string | NodePool ID |
name | string | NodePool resource name |
project_id | string | Project id (wire: projectId) |
anti_affinity | boolean | Enable anti affinity groups for nodes in the pool (wire: antiAffinity) |
attach_floating_ips | object | Parameters for optional node exposition via a floating IP per node (wire: attachFloatingIps) |
autoscale | boolean | Enable auto-scaling for the pool |
autoscaling | object | Autoscaling customization parameters |
availability_zones | array | List of availability zones where nodes will be created (only 1 zone is supported for now) (wire: availabilityZones) |
available_nodes | integer | Number of nodes which are actually ready in the pool (wire: availableNodes) |
created_at | string (date-time) | Creation date (wire: createdAt) |
current_nodes | integer | Number of nodes present in the pool (wire: currentNodes) |
desired_nodes | integer | Number of nodes you desire in the pool (wire: desiredNodes) |
flavor | string | Flavor name |
max_nodes | integer | Number of nodes you desire in the pool (wire: maxNodes) |
min_nodes | integer | Number of nodes you desire in the pool (wire: minNodes) |
monthly_billed | boolean | Enable monthly billing on all nodes in the pool (wire: monthlyBilled) |
size_status | string | Status describing the state between number of nodes wanted and available ones (CAPACITY_OK, OVER_CAPACITY, UNDER_CAPACITY) (wire: sizeStatus) |
status | string | Current 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) |
template | object | Template of nodes metadata and spec to create in the pool |
up_to_date_nodes | integer | Number of nodes with latest version installed in the pool (wire: upToDateNodes) |
updated_at | string (date-time) | Last update date (wire: updatedAt) |
NodePool created on your cluster to manage your nodes
| Name | Datatype | Description |
|---|---|---|
id | string | NodePool ID |
name | string | NodePool resource name |
project_id | string | Project id (wire: projectId) |
anti_affinity | boolean | Enable anti affinity groups for nodes in the pool (wire: antiAffinity) |
attach_floating_ips | object | Parameters for optional node exposition via a floating IP per node (wire: attachFloatingIps) |
autoscale | boolean | Enable auto-scaling for the pool |
autoscaling | object | Autoscaling customization parameters |
availability_zones | array | List of availability zones where nodes will be created (only 1 zone is supported for now) (wire: availabilityZones) |
available_nodes | integer | Number of nodes which are actually ready in the pool (wire: availableNodes) |
created_at | string (date-time) | Creation date (wire: createdAt) |
current_nodes | integer | Number of nodes present in the pool (wire: currentNodes) |
desired_nodes | integer | Number of nodes you desire in the pool (wire: desiredNodes) |
flavor | string | Flavor name |
max_nodes | integer | Number of nodes you desire in the pool (wire: maxNodes) |
min_nodes | integer | Number of nodes you desire in the pool (wire: minNodes) |
monthly_billed | boolean | Enable monthly billing on all nodes in the pool (wire: monthlyBilled) |
size_status | string | Status describing the state between number of nodes wanted and available ones (CAPACITY_OK, OVER_CAPACITY, UNDER_CAPACITY) (wire: sizeStatus) |
status | string | Current 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) |
template | object | Template of nodes metadata and spec to create in the pool |
up_to_date_nodes | integer | Number of nodes with latest version installed in the pool (wire: upToDateNodes) |
updated_at | string (date-time) | Last update date (wire: updatedAt) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | kube_id, node_pool_id, service_name | Get information on a specific nodepool on your cluster | |
list | select | kube_id, service_name | List your nodepools | |
create | insert | kube_id, service_name, flavor_name | Create a nodepool on your cluster | |
update | update | kube_id, node_pool_id, service_name | Update your nodepool information | |
delete | delete | kube_id, node_pool_id, service_name | Delete 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.
| 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"}}) |
kube_id | string | Kube ID (wire: kubeId) |
node_pool_id | string | Node pool ID (wire: nodePoolId) |
service_name | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
SELECT examples​
- get
- list
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
;
List your nodepools
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 service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: nodepools
props:
- name: kube_id
value: "{{ kube_id }}"
description: Required parameter for the nodepools resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the nodepools resource.
- name: anti_affinity
value: {{ anti_affinity }}
description: |
Enable anti affinity groups for nodes in the pool
- name: attach_floating_ips
description: |
Parameters for optional node exposition via a floating IP per node
value:
enabled: {{ enabled }}
- name: autoscale
value: {{ autoscale }}
description: |
Enable the auto-scaling on the pool
- name: autoscaling
description: |
Autoscaling customization parameters
value:
scaleDownUnneededTimeSeconds: {{ scaleDownUnneededTimeSeconds }}
scaleDownUnreadyTimeSeconds: {{ scaleDownUnreadyTimeSeconds }}
scaleDownUtilizationThreshold: {{ scaleDownUtilizationThreshold }}
- name: availability_zones
value:
- "{{ availability_zones }}"
description: |
List of availability zones where nodes will be created (only 1 zone is supported for now)
- name: desired_nodes
value: {{ desired_nodes }}
description: |
Number of nodes to instantiate (1 by default)
- name: flavor_name
value: "{{ flavor_name }}"
description: |
Nodes flavor
- name: max_nodes
value: {{ max_nodes }}
description: |
Higher limit you accept for the desiredNodes value (100 by default)
- name: min_nodes
value: {{ min_nodes }}
description: |
Lower limit you accept for the desiredNodes value (0 by default)
- name: monthly_billed
value: {{ monthly_billed }}
description: |
Enable monthly billing for nodes in the pool
- name: name
value: "{{ name }}"
description: |
NodePool name
- name: template
description: |
NodePool template to apply to each children nodes
value:
metadata:
annotations: "{{ annotations }}"
finalizers:
- "{{ finalizers }}"
labels: "{{ labels }}"
spec:
taints:
- effect: "{{ effect }}"
key: "{{ key }}"
value: "{{ value }}"
unschedulable: {{ unschedulable }}
UPDATE examples​
- update
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
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
;