Skip to main content

nodegroups

Creates, updates, deletes or gets a nodegroup resource or lists nodegroups in a region

Overview

Namenodegroups
TypeResource
DescriptionResource schema for AWS::EKS::Nodegroup
Idawscc.eks.nodegroups

Fields

NameDatatypeDescription
ami_typestringThe AMI type for your node group.
capacity_typestringThe capacity type of your managed node group.
cluster_namestringName of the cluster to create the node group in.
disk_sizeintegerThe root device disk size (in GiB) for your node group instances.
force_update_enabledbooleanForce the update if the existing node group's pods are unable to be drained due to a pod disruption budget issue.
instance_typesarraySpecify the instance types for a node group.
labelsobjectThe Kubernetes labels to be applied to the nodes in the node group when they are created.
launch_templateobjectAn object representing a node group's launch template specification.
nodegroup_namestringThe unique name to give your node group.
node_rolestringThe Amazon Resource Name (ARN) of the IAM role to associate with your node group.
release_versionstringThe AMI version of the Amazon EKS-optimized AMI to use with your node group.
remote_accessobjectThe remote access (SSH) configuration to use with your node group.
scaling_configobjectThe scaling configuration details for the Auto Scaling group that is created for your node group.
subnetsarrayThe subnets to use for the Auto Scaling group that is created for your node group.
tagsobjectThe metadata, as key-value pairs, to apply to the node group to assist with categorization and organization. Follows same schema as Labels for consistency.
taintsarrayThe Kubernetes taints to be applied to the nodes in the node group when they are created.
update_configobjectThe node group update configuration.
node_repair_configobjectThe node auto repair configuration for node group.
versionstringThe Kubernetes version to use for your managed nodes.
idstring
arnstring
regionstringAWS region.

For more information, see AWS::EKS::Nodegroup.

Methods

NameResourceAccessible byRequired Params
create_resourcenodegroupsINSERTClusterName, NodeRole, Subnets, region
delete_resourcenodegroupsDELETEIdentifier, region
update_resourcenodegroupsUPDATEIdentifier, PatchDocument, region
list_resourcesnodegroups_list_onlySELECTregion
get_resourcenodegroupsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual nodegroup.

SELECT
region,
ami_type,
capacity_type,
cluster_name,
disk_size,
force_update_enabled,
instance_types,
labels,
launch_template,
nodegroup_name,
node_role,
release_version,
remote_access,
scaling_config,
subnets,
tags,
taints,
update_config,
node_repair_config,
version,
id,
arn
FROM awscc.eks.nodegroups
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}';

INSERT example

Use the following StackQL query and manifest file to create a new nodegroup resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.eks.nodegroups (
ClusterName,
NodeRole,
Subnets,
region
)
SELECT
'{{ cluster_name }}',
'{{ node_role }}',
'{{ subnets }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a nodegroup resource, using stack-deploy.

/*+ update */
UPDATE awscc.eks.nodegroups
SET PatchDocument = string('{{ {
"ForceUpdateEnabled": force_update_enabled,
"Labels": labels,
"LaunchTemplate": launch_template,
"ReleaseVersion": release_version,
"ScalingConfig": scaling_config,
"Tags": tags,
"Taints": taints,
"UpdateConfig": update_config,
"NodeRepairConfig": node_repair_config,
"Version": version
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.eks.nodegroups
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';

Permissions

To operate on the nodegroups resource, the following permissions are required:

eks:CreateNodegroup,
eks:DescribeNodegroup,
eks:TagResource,
ec2:DescribeSubnets,
ec2:DescribeVpcs,
ec2:DescribeSecurityGroups,
ec2:DescribeKeyPairs,
ec2:CreateTags,
ec2:DeleteTags,
ec2:DescribeRouteTables,
ec2:DescribeLaunchTemplates,
ec2:DescribeLaunchTemplateVersions,
ec2:RunInstances,
iam:CreateServiceLinkedRole,
iam:GetRole,
iam:PassRole,
iam:ListAttachedRolePolicies