AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the Amazon Elastic Container Service for Kubernetes CreateNodegroup API operation.

Syntax

New-EKSNodegroup
-NodegroupName <String>
-AmiType <AMITypes>
-ClientRequestToken <String>
-ClusterName <String>
-ScalingConfig_DesiredSize <Int32>
-DiskSize <Int32>
-RemoteAccess_Ec2SshKey <String>
-LaunchTemplate_Id <String>
-InstanceType <String[]>
-Label <Hashtable>
-ScalingConfig_MaxSize <Int32>
-ScalingConfig_MinSize <Int32>
-LaunchTemplate_Name <String>
-NodeRole <String>
-ReleaseVersion <String>
-RemoteAccess_SourceSecurityGroup <String[]>
-Subnet <String[]>
-Tag <Hashtable>
-LaunchTemplate_Version <String>
-Version <String>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>

Description

Creates a managed worker 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 Launch template support. An Amazon EKS managed node group is an Amazon EC2 Auto Scaling group and associated Amazon EC2 instances that are managed by AWS for an Amazon EKS cluster. Each node group uses a version of the Amazon EKS-optimized Amazon Linux 2 AMI. For more information, see Managed Node Groups in the Amazon EKS User Guide.

Parameters

-AmiType <AMITypes>
The AMI type for your node group. GPU instance types should use the AL2_x86_64_GPU AMI type. Non-GPU instances should use the AL2_x86_64 AMI type. Arm instances should use the AL2_ARM_64 AMI type. All types use the Amazon EKS-optimized Amazon Linux 2 AMI. If you specify launchTemplate, and your launch template uses a custom AMI, then don't specify amiType, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Launch template support in the Amazon EKS User Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ClientRequestToken <String>
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ClusterName <String>
The name of the cluster to create the node group in.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-DiskSize <Int32>
The root device disk size (in GiB) for your node group instances. The default disk size is 20 GiB. If you specify launchTemplate, then don't specify diskSize, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Launch template support in the Amazon EKS User Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-InstanceType <String[]>
The instance type to use for your node group. You can specify a single instance type for a node group. The default value for instanceTypes is t3.medium. If you choose a GPU instance type, be sure to specify AL2_x86_64_GPU with the amiType parameter. If you specify launchTemplate, then don't specify instanceTypes, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Launch template support in the Amazon EKS User Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInstanceTypes
-Label <Hashtable>
The Kubernetes labels to be applied to the nodes in the node group when they are created.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesLabels
-LaunchTemplate_Id <String>
The ID of the launch template.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-LaunchTemplate_Name <String>
The name of the launch template.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-LaunchTemplate_Version <String>
The version of the launch template to use. If no version is specified, then the template's default version is used.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NodegroupName <String>
The unique name to give your node group.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-NodeRole <String>
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 AWS APIs on your behalf. Worker nodes receive permissions for these API calls through an IAM instance profile and associated policies. Before you can launch worker nodes and register them into a cluster, you must create an IAM role for those worker nodes to use when they are launched. For more information, see Amazon EKS Worker Node IAM Role in the Amazon EKS User Guide. If you specify launchTemplate, then don't specify IamInstanceProfile in your launch template, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Launch template support in the Amazon EKS User Guide.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the NodegroupName parameter. The -PassThru parameter is deprecated, use -Select '^NodegroupName' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ReleaseVersion <String>
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 more information, see Amazon EKS-Optimized Linux AMI Versions in the Amazon EKS User Guide. If you specify launchTemplate, and your launch template uses a custom AMI, then don't specify releaseVersion, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Launch template support in the Amazon EKS User Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-RemoteAccess_Ec2SshKey <String>
The Amazon EC2 SSH key that provides access for SSH communication with the worker nodes in the managed node group. For more information, see Amazon EC2 Key Pairs in the Amazon Elastic Compute Cloud User Guide for Linux Instances.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-RemoteAccess_SourceSecurityGroup <String[]>
The security groups that are allowed SSH access (port 22) to the worker nodes. If you specify an Amazon EC2 SSH key but do not specify a source security group when you create a managed node group, then port 22 on the worker nodes is opened to the internet (0.0.0.0/0). For more information, see Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRemoteAccess_SourceSecurityGroups
-ScalingConfig_DesiredSize <Int32>
The current number of worker nodes that the managed node group should maintain.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ScalingConfig_MaxSize <Int32>
The maximum number of worker nodes that the managed node group can scale out to. Managed node groups can support up to 100 nodes by default.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ScalingConfig_MinSize <Int32>
The minimum number of worker nodes that the managed node group can scale in to. This number must be greater than zero.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is 'Nodegroup'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.EKS.Model.CreateNodegroupResponse). Specifying the name of a property of type Amazon.EKS.Model.CreateNodegroupResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Subnet <String[]>
The subnets to use for the Auto Scaling group that is created for your node group. These subnets must have the tag key kubernetes.io/cluster/CLUSTER_NAME with a value of shared, where CLUSTER_NAME is replaced with the name of your cluster. If you specify launchTemplate, then don't specify SubnetId in your launch template, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Launch template support in the Amazon EKS User Guide.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSubnets
-Tag <Hashtable>
The metadata to apply to the node group to assist with categorization and organization. Each tag consists of a key and an optional value, both of which you define. Node group tags do not propagate to any other resources associated with the node group, such as the Amazon EC2 instances or subnets.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags
-Version <String>
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 specify version, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see Launch template support in the Amazon EKS User Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns an Amazon.EKS.Model.Nodegroup object. The service call response (type Amazon.EKS.Model.CreateNodegroupResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z