K8s Nodepool
k8s_nodepool
This is a simple module that supports creating or removing K8s Nodepools. This module has a dependency on ionoscloud >= 6.0.2
Example Syntax
Returned object
For more examples please check out the tests here.
NOTE: If you are using a versions 7.0.0 and up: modules can replace resources if certain set parameters differ from the results found in the API!
Parameters that can trigger a resource replacement:
datacenter
name
cpu_family
cores_count
ram_size
availability_zone
storage_type
storage_size
state: present
Available parameters for state present:
k8s_cluster str
True
The ID or name of the K8s cluster.
name str
True
A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
k8s_version str
False
The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions.
datacenter str
True
The unique identifier of the VDC where the worker nodes of the node pool are provisioned.Note that the data center is located in the exact place where the parent cluster of the node pool is located.
lans list
False
The array of existing private LANs to attach to worker nodes.
node_count int
False
The number of worker nodes of the node pool.
cpu_family str
True
The CPU type for the nodes.
cores_count int
True
The total number of cores for the nodes.
ram_size int
True
The RAM size for the nodes. Must be specified in multiples of 1024 MB, with a minimum size of 2048 MB.
availability_zone str
False
The availability zone in which the target VM should be provisioned. Options: ['AUTO', 'ZONE_1', 'ZONE_2']
storage_type str
True
The storage type for the nodes. Options: ['HDD', 'SSD']
storage_size int
True
The allocated volume size in GB. The allocated volume size in GB. To achieve good performance, we recommend a size greater than 100GB for SSD.
maintenance_window dict
False
The maintenance window is used to update the software on the node pool nodes and update the K8s version of the node pool. If no value is specified, a value is selected dynamically, so there is no fixed default value.
labels dict
False
The labels attached to the node pool.
annotations dict
False
The annotations attached to the node pool.
auto_scaling dict
False
Property to be set when auto-scaling needs to be enabled for the nodepool. By default, auto-scaling is not enabled.
public_ips list
False
Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt.
allow_replace bool
False
Boolean indicating if the resource should be recreated when the state cannot be reached in another way. This may be used to prevent resources from being deleted from specifying a different value to an immutable property. An error will be thrown instead Default: False
api_url str
False
The Ionos API base URL.
certificate_fingerprint str
False
The Ionos API certificate fingerprint.
username str
False
The Ionos username. Overrides the IONOS_USERNAME environment variable.
password str
False
The Ionos password. Overrides the IONOS_PASSWORD environment variable.
token str
False
The Ionos token. Overrides the IONOS_TOKEN environment variable.
wait bool
False
Wait for the resource to be created before returning. Default: True Options: [True, False]
wait_timeout int
False
How long before wait gives up, in seconds. Default: 3600
state str
False
Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']
state: absent
Available parameters for state absent:
k8s_cluster str
True
The ID or name of the K8s cluster.
k8s_nodepool str
True
The ID or name of the K8s nodepool.
api_url str
False
The Ionos API base URL.
certificate_fingerprint str
False
The Ionos API certificate fingerprint.
username str
False
The Ionos username. Overrides the IONOS_USERNAME environment variable.
password str
False
The Ionos password. Overrides the IONOS_PASSWORD environment variable.
token str
False
The Ionos token. Overrides the IONOS_TOKEN environment variable.
wait bool
False
Wait for the resource to be created before returning. Default: True Options: [True, False]
wait_timeout int
False
How long before wait gives up, in seconds. Default: 3600
state str
False
Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']
state: update
Available parameters for state update:
k8s_cluster str
True
The ID or name of the K8s cluster.
k8s_nodepool str
True
The ID or name of the K8s nodepool.
name str
False
A Kubernetes node pool name. Valid Kubernetes node pool name must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
k8s_version str
False
The Kubernetes version running in the node pool. Note that this imposes restrictions on which Kubernetes versions can run in the node pools of a cluster. Also, not all Kubernetes versions are suitable upgrade targets for all earlier versions.
datacenter str
False
The unique identifier of the VDC where the worker nodes of the node pool are provisioned.Note that the data center is located in the exact place where the parent cluster of the node pool is located.
lans list
False
The array of existing private LANs to attach to worker nodes.
node_count int
False
The number of worker nodes of the node pool.
cpu_family str
False
The CPU type for the nodes.
cores_count int
False
The total number of cores for the nodes.
ram_size int
False
The RAM size for the nodes. Must be specified in multiples of 1024 MB, with a minimum size of 2048 MB.
availability_zone str
False
The availability zone in which the target VM should be provisioned. Options: ['AUTO', 'ZONE_1', 'ZONE_2']
storage_type str
False
The storage type for the nodes. Options: ['HDD', 'SSD']
storage_size int
False
The allocated volume size in GB. The allocated volume size in GB. To achieve good performance, we recommend a size greater than 100GB for SSD.
maintenance_window dict
False
The maintenance window is used to update the software on the node pool nodes and update the K8s version of the node pool. If no value is specified, a value is selected dynamically, so there is no fixed default value.
labels dict
False
The labels attached to the node pool.
annotations dict
False
The annotations attached to the node pool.
auto_scaling dict
False
Property to be set when auto-scaling needs to be enabled for the nodepool. By default, auto-scaling is not enabled.
public_ips list
False
Optional array of reserved public IP addresses to be used by the nodes. The IPs must be from the exact location of the node pool's data center. If autoscaling is used, the array must contain one more IP than the maximum possible number of nodes (nodeCount+1 for a fixed number of nodes or maxNodeCount+1). The extra IP is used when the nodes are rebuilt.
allow_replace bool
False
Boolean indicating if the resource should be recreated when the state cannot be reached in another way. This may be used to prevent resources from being deleted from specifying a different value to an immutable property. An error will be thrown instead Default: False
api_url str
False
The Ionos API base URL.
certificate_fingerprint str
False
The Ionos API certificate fingerprint.
username str
False
The Ionos username. Overrides the IONOS_USERNAME environment variable.
password str
False
The Ionos password. Overrides the IONOS_PASSWORD environment variable.
token str
False
The Ionos token. Overrides the IONOS_TOKEN environment variable.
wait bool
False
Wait for the resource to be created before returning. Default: True Options: [True, False]
wait_timeout int
False
How long before wait gives up, in seconds. Default: 3600
state str
False
Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update']
Last updated