/AWS1/IF_EKS=>CREATENODEGROUP()¶
About CreateNodegroup¶
Creates a managed node group for an Amazon EKS cluster.
You can only create a node group for your cluster that is equal to the current Kubernetes version for the cluster. All node groups are created with the latest AMI release version for the respective minor Kubernetes version of the cluster, unless you deploy a custom AMI using a launch template.
For later updates, you will only be able to update a node group using a launch template only if it was originally deployed with a launch template. Additionally, the launch template ID or name must match what was used when the node group was created. You can update the launch template version with necessary changes. For more information about using launch templates, see Customizing managed nodes with launch templates.
An Amazon EKS managed node group is an Amazon EC2 Auto Scaling group and associated Amazon EC2 instances that are managed by Amazon Web Services for an Amazon EKS cluster. For more information, see Managed node groups in the Amazon EKS User Guide.
Windows AMI types are only supported for commercial Amazon Web Services Regions that support Windows on Amazon EKS.
Method Signature¶
METHODS /AWS1/IF_EKS~CREATENODEGROUP
IMPORTING
!IV_CLUSTERNAME TYPE /AWS1/EKSSTRING OPTIONAL
!IV_NODEGROUPNAME TYPE /AWS1/EKSSTRING OPTIONAL
!IO_SCALINGCONFIG TYPE REF TO /AWS1/CL_EKSNODEGROUPSCACONFIG OPTIONAL
!IV_DISKSIZE TYPE /AWS1/EKSBOXEDINTEGER OPTIONAL
!IT_SUBNETS TYPE /AWS1/CL_EKSSTRINGLIST_W=>TT_STRINGLIST OPTIONAL
!IT_INSTANCETYPES TYPE /AWS1/CL_EKSSTRINGLIST_W=>TT_STRINGLIST OPTIONAL
!IV_AMITYPE TYPE /AWS1/EKSAMITYPES OPTIONAL
!IO_REMOTEACCESS TYPE REF TO /AWS1/CL_EKSREMOTEACCESSCONFIG OPTIONAL
!IV_NODEROLE TYPE /AWS1/EKSSTRING OPTIONAL
!IT_LABELS TYPE /AWS1/CL_EKSLABELSMAP_W=>TT_LABELSMAP OPTIONAL
!IT_TAINTS TYPE /AWS1/CL_EKSTAINT=>TT_TAINTSLIST OPTIONAL
!IT_TAGS TYPE /AWS1/CL_EKSTAGMAP_W=>TT_TAGMAP OPTIONAL
!IV_CLIENTREQUESTTOKEN TYPE /AWS1/EKSSTRING OPTIONAL
!IO_LAUNCHTEMPLATE TYPE REF TO /AWS1/CL_EKSLAUNCHTEMPLATESPEC OPTIONAL
!IO_UPDATECONFIG TYPE REF TO /AWS1/CL_EKSNODEGROUPUPDATECFG OPTIONAL
!IO_NODEREPAIRCONFIG TYPE REF TO /AWS1/CL_EKSNODEREPAIRCONFIG OPTIONAL
!IV_CAPACITYTYPE TYPE /AWS1/EKSCAPACITYTYPES OPTIONAL
!IV_VERSION TYPE /AWS1/EKSSTRING OPTIONAL
!IV_RELEASEVERSION TYPE /AWS1/EKSSTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ekscreatenodegrouprsp
RAISING
/AWS1/CX_EKSCLIENTEXCEPTION
/AWS1/CX_EKSINVALIDPARAMETEREX
/AWS1/CX_EKSINVALIDREQUESTEX
/AWS1/CX_EKSRESOURCEINUSEEX
/AWS1/CX_EKSRESRCLIMITEXCDEX
/AWS1/CX_EKSSERVEREXCEPTION
/AWS1/CX_EKSSERVICEUNAVAILEX
/AWS1/CX_EKSCLIENTEXC
/AWS1/CX_EKSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_clustername TYPE /AWS1/EKSSTRING /AWS1/EKSSTRING¶
The name of your cluster.
iv_nodegroupname TYPE /AWS1/EKSSTRING /AWS1/EKSSTRING¶
The unique name to give your node group.
it_subnets TYPE /AWS1/CL_EKSSTRINGLIST_W=>TT_STRINGLIST TT_STRINGLIST¶
The subnets to use for the Auto Scaling group that is created for your node group. If you specify
launchTemplate, then don't specifySubnetIdin your launch template, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Customizing managed nodes with launch templates in the Amazon EKS User Guide.
iv_noderole TYPE /AWS1/EKSSTRING /AWS1/EKSSTRING¶
The Amazon Resource Name (ARN) of the IAM role to associate with your node group. The Amazon EKS worker node
kubeletdaemon makes calls to Amazon Web Services APIs on your behalf. Nodes receive permissions for these API calls through an IAM instance profile and associated policies. Before you can launch nodes and register them into a cluster, you must create an IAM role for those nodes to use when they are launched. For more information, see Amazon EKS node IAM role in the Amazon EKS User Guide . If you specifylaunchTemplate, then don't specifyIamInstanceProfilein your launch template, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Customizing managed nodes with launch templates in the Amazon EKS User Guide.
Optional arguments:¶
io_scalingconfig TYPE REF TO /AWS1/CL_EKSNODEGROUPSCACONFIG /AWS1/CL_EKSNODEGROUPSCACONFIG¶
The scaling configuration details for the Auto Scaling group that is created for your node group.
iv_disksize TYPE /AWS1/EKSBOXEDINTEGER /AWS1/EKSBOXEDINTEGER¶
The root device disk size (in GiB) for your node group instances. The default disk size is 20 GiB for Linux and Bottlerocket. The default disk size is 50 GiB for Windows. If you specify
launchTemplate, then don't specifydiskSize, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Customizing managed nodes with launch templates in the Amazon EKS User Guide.
it_instancetypes TYPE /AWS1/CL_EKSSTRINGLIST_W=>TT_STRINGLIST TT_STRINGLIST¶
Specify the instance types for a node group. If you specify a GPU instance type, make sure to also specify an applicable GPU AMI type with the
amiTypeparameter. If you specifylaunchTemplate, then you can specify zero or one instance type in your launch template or you can specify 0-20 instance types forinstanceTypes. If however, you specify an instance type in your launch template and specify anyinstanceTypes, the node group deployment will fail. If you don't specify an instance type in a launch template or forinstanceTypes, thent3.mediumis used, by default. If you specifySpotforcapacityType, then we recommend specifying multiple values forinstanceTypes. For more information, see Managed node group capacity types and Customizing managed nodes with launch templates in the Amazon EKS User Guide.
iv_amitype TYPE /AWS1/EKSAMITYPES /AWS1/EKSAMITYPES¶
The AMI type for your node group. If you specify
launchTemplate, and your launch template uses a custom AMI, then don't specifyamiType, or the node group deployment will fail. If your launch template uses a Windows custom AMI, then addeks:kube-proxy-windowsto your Windows nodesrolearnin theaws-authConfigMap. For more information about using launch templates with Amazon EKS, see Customizing managed nodes with launch templates in the Amazon EKS User Guide.
io_remoteaccess TYPE REF TO /AWS1/CL_EKSREMOTEACCESSCONFIG /AWS1/CL_EKSREMOTEACCESSCONFIG¶
The remote access configuration to use with your node group. For Linux, the protocol is SSH. For Windows, the protocol is RDP. If you specify
launchTemplate, then don't specifyremoteAccess, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Customizing managed nodes with launch templates in the Amazon EKS User Guide.
it_labels TYPE /AWS1/CL_EKSLABELSMAP_W=>TT_LABELSMAP TT_LABELSMAP¶
The Kubernetes
labelsto apply to the nodes in the node group when they are created.
it_taints TYPE /AWS1/CL_EKSTAINT=>TT_TAINTSLIST TT_TAINTSLIST¶
The Kubernetes taints to be applied to the nodes in the node group. For more information, see Node taints on managed node groups.
it_tags TYPE /AWS1/CL_EKSTAGMAP_W=>TT_TAGMAP TT_TAGMAP¶
Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.
iv_clientrequesttoken TYPE /AWS1/EKSSTRING /AWS1/EKSSTRING¶
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
io_launchtemplate TYPE REF TO /AWS1/CL_EKSLAUNCHTEMPLATESPEC /AWS1/CL_EKSLAUNCHTEMPLATESPEC¶
An object representing a node group's launch template specification. When using this object, don't directly specify
instanceTypes,diskSize, orremoteAccess. You cannot later specify a different launch template ID or name than what was used to create the node group.Make sure that the launch template meets the requirements in
launchTemplateSpecification. Also refer to Customizing managed nodes with launch templates in the Amazon EKS User Guide.
io_updateconfig TYPE REF TO /AWS1/CL_EKSNODEGROUPUPDATECFG /AWS1/CL_EKSNODEGROUPUPDATECFG¶
The node group update configuration.
io_noderepairconfig TYPE REF TO /AWS1/CL_EKSNODEREPAIRCONFIG /AWS1/CL_EKSNODEREPAIRCONFIG¶
The node auto repair configuration for the node group.
iv_capacitytype TYPE /AWS1/EKSCAPACITYTYPES /AWS1/EKSCAPACITYTYPES¶
The capacity type for your node group.
iv_version TYPE /AWS1/EKSSTRING /AWS1/EKSSTRING¶
The Kubernetes version to use for your managed nodes. By default, the Kubernetes version of the cluster is used, and this is the only accepted specified value. If you specify
launchTemplate, and your launch template uses a custom AMI, then don't specifyversion, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Customizing managed nodes with launch templates in the Amazon EKS User Guide.
iv_releaseversion TYPE /AWS1/EKSSTRING /AWS1/EKSSTRING¶
The AMI version of the Amazon EKS optimized AMI to use with your node group. By default, the latest available AMI version for the node group's current Kubernetes version is used. For information about Linux versions, see Amazon EKS optimized Amazon Linux AMI versions in the Amazon EKS User Guide. Amazon EKS managed node groups support the November 2022 and later releases of the Windows AMIs. For information about Windows versions, see Amazon EKS optimized Windows AMI versions in the Amazon EKS User Guide.
If you specify
launchTemplate, and your launch template uses a custom AMI, then don't specifyreleaseVersion, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Customizing managed nodes with launch templates in the Amazon EKS User Guide.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ekscreatenodegrouprsp /AWS1/CL_EKSCREATENODEGROUPRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createnodegroup(
io_launchtemplate = new /aws1/cl_ekslaunchtemplatespec(
iv_id = |string|
iv_name = |string|
iv_version = |string|
)
io_noderepairconfig = new /aws1/cl_eksnoderepairconfig(
it_noderepairconfigoverrides = VALUE /aws1/cl_eksnoderepaircfgovrds=>tt_noderepairconfigovrdslist(
(
new /aws1/cl_eksnoderepaircfgovrds(
iv_minrepairwaittimemins = 123
iv_nodemonitoringcondition = |string|
iv_nodeunhealthyreason = |string|
iv_repairaction = |string|
)
)
)
iv_enabled = ABAP_TRUE
iv_maxparallelnodesrepaire00 = 123
iv_maxparallelnodesrepaire01 = 123
iv_maxunhlthynodethreshcount = 123
iv_maxunhlthynodethreshper00 = 123
)
io_remoteaccess = new /aws1/cl_eksremoteaccessconfig(
it_sourcesecuritygroups = VALUE /aws1/cl_eksstringlist_w=>tt_stringlist(
( new /aws1/cl_eksstringlist_w( |string| ) )
)
iv_ec2sshkey = |string|
)
io_scalingconfig = new /aws1/cl_eksnodegroupscaconfig(
iv_desiredsize = 123
iv_maxsize = 123
iv_minsize = 123
)
io_updateconfig = new /aws1/cl_eksnodegroupupdatecfg(
iv_maxunavailable = 123
iv_maxunavailablepercentage = 123
iv_updatestrategy = |string|
)
it_instancetypes = VALUE /aws1/cl_eksstringlist_w=>tt_stringlist(
( new /aws1/cl_eksstringlist_w( |string| ) )
)
it_labels = VALUE /aws1/cl_ekslabelsmap_w=>tt_labelsmap(
(
VALUE /aws1/cl_ekslabelsmap_w=>ts_labelsmap_maprow(
key = |string|
value = new /aws1/cl_ekslabelsmap_w( |string| )
)
)
)
it_subnets = VALUE /aws1/cl_eksstringlist_w=>tt_stringlist(
( new /aws1/cl_eksstringlist_w( |string| ) )
)
it_tags = VALUE /aws1/cl_ekstagmap_w=>tt_tagmap(
(
VALUE /aws1/cl_ekstagmap_w=>ts_tagmap_maprow(
key = |string|
value = new /aws1/cl_ekstagmap_w( |string| )
)
)
)
it_taints = VALUE /aws1/cl_ekstaint=>tt_taintslist(
(
new /aws1/cl_ekstaint(
iv_effect = |string|
iv_key = |string|
iv_value = |string|
)
)
)
iv_amitype = |string|
iv_capacitytype = |string|
iv_clientrequesttoken = |string|
iv_clustername = |string|
iv_disksize = 123
iv_nodegroupname = |string|
iv_noderole = |string|
iv_releaseversion = |string|
iv_version = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_nodegroup = lo_result->get_nodegroup( ).
IF lo_nodegroup IS NOT INITIAL.
lv_string = lo_nodegroup->get_nodegroupname( ).
lv_string = lo_nodegroup->get_nodegrouparn( ).
lv_string = lo_nodegroup->get_clustername( ).
lv_string = lo_nodegroup->get_version( ).
lv_string = lo_nodegroup->get_releaseversion( ).
lv_timestamp = lo_nodegroup->get_createdat( ).
lv_timestamp = lo_nodegroup->get_modifiedat( ).
lv_nodegroupstatus = lo_nodegroup->get_status( ).
lv_capacitytypes = lo_nodegroup->get_capacitytype( ).
lo_nodegroupscalingconfig = lo_nodegroup->get_scalingconfig( ).
IF lo_nodegroupscalingconfig IS NOT INITIAL.
lv_zerocapacity = lo_nodegroupscalingconfig->get_minsize( ).
lv_capacity = lo_nodegroupscalingconfig->get_maxsize( ).
lv_zerocapacity = lo_nodegroupscalingconfig->get_desiredsize( ).
ENDIF.
LOOP AT lo_nodegroup->get_instancetypes( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_nodegroup->get_subnets( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lo_remoteaccessconfig = lo_nodegroup->get_remoteaccess( ).
IF lo_remoteaccessconfig IS NOT INITIAL.
lv_string = lo_remoteaccessconfig->get_ec2sshkey( ).
LOOP AT lo_remoteaccessconfig->get_sourcesecuritygroups( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_amitypes = lo_nodegroup->get_amitype( ).
lv_string = lo_nodegroup->get_noderole( ).
LOOP AT lo_nodegroup->get_labels( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_labelvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_nodegroup->get_taints( ) into lo_row_3.
lo_row_4 = lo_row_3.
IF lo_row_4 IS NOT INITIAL.
lv_taintkey = lo_row_4->get_key( ).
lv_taintvalue = lo_row_4->get_value( ).
lv_tainteffect = lo_row_4->get_effect( ).
ENDIF.
ENDLOOP.
lo_nodegroupresources = lo_nodegroup->get_resources( ).
IF lo_nodegroupresources IS NOT INITIAL.
LOOP AT lo_nodegroupresources->get_autoscalinggroups( ) into lo_row_5.
lo_row_6 = lo_row_5.
IF lo_row_6 IS NOT INITIAL.
lv_string = lo_row_6->get_name( ).
ENDIF.
ENDLOOP.
lv_string = lo_nodegroupresources->get_remoteaccesssecgroup( ).
ENDIF.
lv_boxedinteger = lo_nodegroup->get_disksize( ).
lo_nodegrouphealth = lo_nodegroup->get_health( ).
IF lo_nodegrouphealth IS NOT INITIAL.
LOOP AT lo_nodegrouphealth->get_issues( ) into lo_row_7.
lo_row_8 = lo_row_7.
IF lo_row_8 IS NOT INITIAL.
lv_nodegroupissuecode = lo_row_8->get_code( ).
lv_string = lo_row_8->get_message( ).
LOOP AT lo_row_8->get_resourceids( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
lo_nodegroupupdateconfig = lo_nodegroup->get_updateconfig( ).
IF lo_nodegroupupdateconfig IS NOT INITIAL.
lv_nonzerointeger = lo_nodegroupupdateconfig->get_maxunavailable( ).
lv_percentcapacity = lo_nodegroupupdateconfig->get_maxunavailablepercentage( ).
lv_nodegroupupdatestrategi = lo_nodegroupupdateconfig->get_updatestrategy( ).
ENDIF.
lo_noderepairconfig = lo_nodegroup->get_noderepairconfig( ).
IF lo_noderepairconfig IS NOT INITIAL.
lv_boxedboolean = lo_noderepairconfig->get_enabled( ).
lv_nonzerointeger = lo_noderepairconfig->get_maxunhlthynodethreshcnt( ).
lv_percentcapacity = lo_noderepairconfig->get_maxunhlthynodethreshpe00( ).
lv_nonzerointeger = lo_noderepairconfig->get_maxparallelnodesrepair00( ).
lv_percentcapacity = lo_noderepairconfig->get_maxparallelnodesrepair01( ).
LOOP AT lo_noderepairconfig->get_noderepairconfigovrds( ) into lo_row_9.
lo_row_10 = lo_row_9.
IF lo_row_10 IS NOT INITIAL.
lv_string = lo_row_10->get_nodemonitoringcondition( ).
lv_string = lo_row_10->get_nodeunhealthyreason( ).
lv_nonzerointeger = lo_row_10->get_minrepairwaittimemins( ).
lv_repairaction = lo_row_10->get_repairaction( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_launchtemplatespecifica = lo_nodegroup->get_launchtemplate( ).
IF lo_launchtemplatespecifica IS NOT INITIAL.
lv_string = lo_launchtemplatespecifica->get_name( ).
lv_string = lo_launchtemplatespecifica->get_version( ).
lv_string = lo_launchtemplatespecifica->get_id( ).
ENDIF.
LOOP AT lo_nodegroup->get_tags( ) into ls_row_11.
lv_key_1 = ls_row_11-key.
lo_value_1 = ls_row_11-value.
IF lo_value_1 IS NOT INITIAL.
lv_tagvalue = lo_value_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.