Create Nodegroup
eks_create_nodegroup | R Documentation |
Creates a managed node group for an Amazon EKS cluster¶
Description¶
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 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.
Usage¶
eks_create_nodegroup(clusterName, nodegroupName, scalingConfig,
diskSize, subnets, instanceTypes, amiType, remoteAccess, nodeRole,
labels, taints, tags, clientRequestToken, launchTemplate, updateConfig,
capacityType, version, releaseVersion)
Arguments¶
clusterName
[required] The name of your cluster.
nodegroupName
[required] The unique name to give your node group.
scalingConfig
The scaling configuration details for the Auto Scaling group that is created for your node group.
diskSize
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.subnets
[required] The subnets to use for the Auto Scaling group that is created for your node group. If you specify
launchTemplate
, then don't specifySubnetId
in 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.instanceTypes
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
amiType
parameter. 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.medium
is used, by default. If you specifySpot
forcapacityType
, 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.amiType
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-windows
to your Windows nodesrolearn
in theaws-auth
ConfigMap
. For more information about using launch templates with Amazon EKS, see Customizing managed nodes with launch templates in the Amazon EKS User Guide.remoteAccess
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.nodeRole
[required] The Amazon Resource Name (ARN) of the IAM role to associate with your node group. The Amazon EKS worker node
kubelet
daemon 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 specifyIamInstanceProfile
in 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.labels
The Kubernetes
labels
to apply to the nodes in the node group when they are created.taints
The Kubernetes taints to be applied to the nodes in the node group. For more information, see Node taints on managed node groups.
tags
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.
clientRequestToken
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
launchTemplate
An object representing a node group's launch template specification. When using this object, don't directly specify
instanceTypes
,diskSize
, orremoteAccess
. Make sure that the launch template meets the requirements inlaunchTemplateSpecification
. Also refer to Customizing managed nodes with launch templates in the Amazon EKS User Guide.updateConfig
The node group update configuration.
capacityType
The capacity type for your node group.
version
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.releaseVersion
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.
Value¶
A list with the following syntax:
list(
nodegroup = list(
nodegroupName = "string",
nodegroupArn = "string",
clusterName = "string",
version = "string",
releaseVersion = "string",
createdAt = as.POSIXct(
"2015-01-01"
),
modifiedAt = as.POSIXct(
"2015-01-01"
),
status = "CREATING"|"ACTIVE"|"UPDATING"|"DELETING"|"CREATE_FAILED"|"DELETE_FAILED"|"DEGRADED",
capacityType = "ON_DEMAND"|"SPOT"|"CAPACITY_BLOCK",
scalingConfig = list(
minSize = 123,
maxSize = 123,
desiredSize = 123
),
instanceTypes = list(
"string"
),
subnets = list(
"string"
),
remoteAccess = list(
ec2SshKey = "string",
sourceSecurityGroups = list(
"string"
)
),
amiType = "AL2_x86_64"|"AL2_x86_64_GPU"|"AL2_ARM_64"|"CUSTOM"|"BOTTLEROCKET_ARM_64"|"BOTTLEROCKET_x86_64"|"BOTTLEROCKET_ARM_64_NVIDIA"|"BOTTLEROCKET_x86_64_NVIDIA"|"WINDOWS_CORE_2019_x86_64"|"WINDOWS_FULL_2019_x86_64"|"WINDOWS_CORE_2022_x86_64"|"WINDOWS_FULL_2022_x86_64"|"AL2023_x86_64_STANDARD"|"AL2023_ARM_64_STANDARD"|"AL2023_x86_64_NEURON"|"AL2023_x86_64_NVIDIA",
nodeRole = "string",
labels = list(
"string"
),
taints = list(
list(
key = "string",
value = "string",
effect = "NO_SCHEDULE"|"NO_EXECUTE"|"PREFER_NO_SCHEDULE"
)
),
resources = list(
autoScalingGroups = list(
list(
name = "string"
)
),
remoteAccessSecurityGroup = "string"
),
diskSize = 123,
health = list(
issues = list(
list(
code = "AutoScalingGroupNotFound"|"AutoScalingGroupInvalidConfiguration"|"Ec2SecurityGroupNotFound"|"Ec2SecurityGroupDeletionFailure"|"Ec2LaunchTemplateNotFound"|"Ec2LaunchTemplateVersionMismatch"|"Ec2SubnetNotFound"|"Ec2SubnetInvalidConfiguration"|"IamInstanceProfileNotFound"|"Ec2SubnetMissingIpv6Assignment"|"IamLimitExceeded"|"IamNodeRoleNotFound"|"NodeCreationFailure"|"AsgInstanceLaunchFailures"|"InstanceLimitExceeded"|"InsufficientFreeAddresses"|"AccessDenied"|"InternalFailure"|"ClusterUnreachable"|"AmiIdNotFound"|"AutoScalingGroupOptInRequired"|"AutoScalingGroupRateLimitExceeded"|"Ec2LaunchTemplateDeletionFailure"|"Ec2LaunchTemplateInvalidConfiguration"|"Ec2LaunchTemplateMaxLimitExceeded"|"Ec2SubnetListTooLong"|"IamThrottling"|"NodeTerminationFailure"|"PodEvictionFailure"|"SourceEc2LaunchTemplateNotFound"|"LimitExceeded"|"Unknown"|"AutoScalingGroupInstanceRefreshActive"|"KubernetesLabelInvalid"|"Ec2LaunchTemplateVersionMaxLimitExceeded",
message = "string",
resourceIds = list(
"string"
)
)
)
),
updateConfig = list(
maxUnavailable = 123,
maxUnavailablePercentage = 123
),
launchTemplate = list(
name = "string",
version = "string",
id = "string"
),
tags = list(
"string"
)
)
)
Request syntax¶
svc$create_nodegroup(
clusterName = "string",
nodegroupName = "string",
scalingConfig = list(
minSize = 123,
maxSize = 123,
desiredSize = 123
),
diskSize = 123,
subnets = list(
"string"
),
instanceTypes = list(
"string"
),
amiType = "AL2_x86_64"|"AL2_x86_64_GPU"|"AL2_ARM_64"|"CUSTOM"|"BOTTLEROCKET_ARM_64"|"BOTTLEROCKET_x86_64"|"BOTTLEROCKET_ARM_64_NVIDIA"|"BOTTLEROCKET_x86_64_NVIDIA"|"WINDOWS_CORE_2019_x86_64"|"WINDOWS_FULL_2019_x86_64"|"WINDOWS_CORE_2022_x86_64"|"WINDOWS_FULL_2022_x86_64"|"AL2023_x86_64_STANDARD"|"AL2023_ARM_64_STANDARD"|"AL2023_x86_64_NEURON"|"AL2023_x86_64_NVIDIA",
remoteAccess = list(
ec2SshKey = "string",
sourceSecurityGroups = list(
"string"
)
),
nodeRole = "string",
labels = list(
"string"
),
taints = list(
list(
key = "string",
value = "string",
effect = "NO_SCHEDULE"|"NO_EXECUTE"|"PREFER_NO_SCHEDULE"
)
),
tags = list(
"string"
),
clientRequestToken = "string",
launchTemplate = list(
name = "string",
version = "string",
id = "string"
),
updateConfig = list(
maxUnavailable = 123,
maxUnavailablePercentage = 123
),
capacityType = "ON_DEMAND"|"SPOT"|"CAPACITY_BLOCK",
version = "string",
releaseVersion = "string"
)