CfnNodegroup

class aws_cdk.aws_eks_legacy.CfnNodegroup(scope, id, *, cluster_name, node_role, subnets, ami_type=None, capacity_type=None, disk_size=None, force_update_enabled=None, instance_types=None, labels=None, launch_template=None, nodegroup_name=None, release_version=None, remote_access=None, scaling_config=None, tags=None, taints=None, update_config=None, version=None)

Bases: CfnResource

A CloudFormation AWS::EKS::Nodegroup.

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 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. For more information, see Managed node groups in the Amazon EKS User Guide . .. epigraph:

Windows AMI types are only supported for commercial Regions that support Windows Amazon EKS.
CloudformationResource:

AWS::EKS::Nodegroup

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_eks_legacy as eks_legacy

cfn_nodegroup = eks_legacy.CfnNodegroup(self, "MyCfnNodegroup",
    cluster_name="clusterName",
    node_role="nodeRole",
    subnets=["subnets"],

    # the properties below are optional
    ami_type="amiType",
    capacity_type="capacityType",
    disk_size=123,
    force_update_enabled=False,
    instance_types=["instanceTypes"],
    labels={
        "labels_key": "labels"
    },
    launch_template=eks_legacy.CfnNodegroup.LaunchTemplateSpecificationProperty(
        id="id",
        name="name",
        version="version"
    ),
    nodegroup_name="nodegroupName",
    release_version="releaseVersion",
    remote_access=eks_legacy.CfnNodegroup.RemoteAccessProperty(
        ec2_ssh_key="ec2SshKey",

        # the properties below are optional
        source_security_groups=["sourceSecurityGroups"]
    ),
    scaling_config=eks_legacy.CfnNodegroup.ScalingConfigProperty(
        desired_size=123,
        max_size=123,
        min_size=123
    ),
    tags={
        "tags_key": "tags"
    },
    taints=[eks_legacy.CfnNodegroup.TaintProperty(
        effect="effect",
        key="key",
        value="value"
    )],
    update_config=eks_legacy.CfnNodegroup.UpdateConfigProperty(
        max_unavailable=123,
        max_unavailable_percentage=123
    ),
    version="version"
)

Create a new AWS::EKS::Nodegroup.

Parameters:
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • cluster_name (str) – The name of the cluster to create the node group in.

  • node_role (str) –

    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. 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 specify launchTemplate , then don’t specify `IamInstanceProfile <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html>`_ 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 .

  • subnets (Sequence[str]) –

    The subnets to use for the Auto Scaling group that is created for your node group. If you specify launchTemplate , then don’t specify `SubnetId <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html>`_ 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 .

  • ami_type (Optional[str]) –

    The AMI type for your node group. If you specify launchTemplate , and your launch template uses a custom AMI, then don’t specify amiType , or the node group deployment will fail. If your launch template uses a Windows custom AMI, then add eks:kube-proxy-windows to your Windows nodes rolearn in the aws-auth ConfigMap . For more information about using launch templates with Amazon EKS, see Launch template support in the Amazon EKS User Guide .

  • capacity_type (Optional[str]) – The capacity type of your managed node group.

  • disk_size (Union[int, float, None]) –

    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 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 .

  • force_update_enabled (Union[bool, IResolvable, None]) – Force the update if the existing node group’s pods are unable to be drained due to a pod disruption budget issue. If an update fails because pods could not be drained, you can force the update after it fails to terminate the old node whether or not any pods are running on the node.

  • instance_types (Optional[Sequence[str]]) –

    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 specify launchTemplate , then you can specify zero or one instance type in your launch template or you can specify 0-20 instance types for instanceTypes . If however, you specify an instance type in your launch template and specify any instanceTypes , the node group deployment will fail. If you don’t specify an instance type in a launch template or for instanceTypes , then t3.medium is used, by default. If you specify Spot for capacityType , then we recommend specifying multiple values for instanceTypes . For more information, see Managed node group capacity types and Launch template support in the Amazon EKS User Guide .

  • labels (Union[IResolvable, Mapping[str, str], None]) – The Kubernetes labels applied to the nodes in the node group. .. epigraph:: Only labels that are applied with the Amazon EKS API are shown here. There may be other Kubernetes labels applied to the nodes in this group.

  • launch_template (Union[IResolvable, LaunchTemplateSpecificationProperty, Dict[str, Any], None]) – An object representing a node group’s launch template specification. If specified, then do not specify instanceTypes , diskSize , or remoteAccess and make sure that the launch template meets the requirements in launchTemplateSpecification .

  • nodegroup_name (Optional[str]) – The unique name to give your node group.

  • release_version (Optional[str]) – The AMI version of the Amazon EKS optimized AMI to use with your node group (for example, 1.14.7- *YYYYMMDD* ). 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 . .. epigraph:: Changing this value triggers an update of the node group if one is available. You can’t update other properties at the same time as updating Release Version .

  • remote_access (Union[IResolvable, RemoteAccessProperty, Dict[str, Any], None]) –

    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 specify remoteAccess , 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 .

  • scaling_config (Union[IResolvable, ScalingConfigProperty, Dict[str, Any], None]) – The scaling configuration details for the Auto Scaling group that is created for your node group.

  • tags (Optional[Mapping[str, str]]) – The metadata applied to the node group to assist with categorization and organization. Each tag consists of a key and an optional value. You define both. Node group tags do not propagate to any other resources associated with the node group, such as the Amazon EC2 instances or subnets.

  • taints (Union[IResolvable, Sequence[Union[IResolvable, TaintProperty, Dict[str, Any]]], None]) – The Kubernetes taints to be applied to the nodes in the node group when they are created. Effect is one of No_Schedule , Prefer_No_Schedule , or No_Execute . Kubernetes taints can be used together with tolerations to control how workloads are scheduled to your nodes. For more information, see Node taints on managed node groups .

  • update_config (Union[IResolvable, UpdateConfigProperty, Dict[str, Any], None]) – The node group update configuration.

  • version (Optional[str]) –

    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 . .. epigraph:: You can’t update other properties at the same time as updating Version .

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type:

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:

attribute_name (str) – The name of the attribute.

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type:

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::EKS::Nodegroup'
ami_type

The AMI type for your node group.

If you specify launchTemplate , and your launch template uses a custom AMI, then don’t specify amiType , or the node group deployment will fail. If your launch template uses a Windows custom AMI, then add eks:kube-proxy-windows to your Windows nodes rolearn in the aws-auth ConfigMap . For more information about using launch templates with Amazon EKS, see Launch template support in the Amazon EKS User Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-amitype

attr_arn

The Amazon Resource Name (ARN) associated with the managed node group.

CloudformationAttribute:

Arn

attr_cluster_name

The name of the cluster that the managed node group resides in.

CloudformationAttribute:

ClusterName

attr_id

Id

Type:

cloudformationAttribute

attr_nodegroup_name

The name associated with an Amazon EKS managed node group.

CloudformationAttribute:

NodegroupName

capacity_type

The capacity type of your managed node group.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-capacitytype

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

cluster_name

The name of the cluster to create the node group in.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-clustername

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

disk_size

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 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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-disksize

force_update_enabled

Force the update if the existing node group’s pods are unable to be drained due to a pod disruption budget issue.

If an update fails because pods could not be drained, you can force the update after it fails to terminate the old node whether or not any pods are running on the node.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-forceupdateenabled

instance_types

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 specify launchTemplate , then you can specify zero or one instance type in your launch template or you can specify 0-20 instance types for instanceTypes . If however, you specify an instance type in your launch template and specify any instanceTypes , the node group deployment will fail. If you don’t specify an instance type in a launch template or for instanceTypes , then t3.medium is used, by default. If you specify Spot for capacityType , then we recommend specifying multiple values for instanceTypes . For more information, see Managed node group capacity types and Launch template support in the Amazon EKS User Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-instancetypes

labels

The Kubernetes labels applied to the nodes in the node group.

Only labels that are applied with the Amazon EKS API are shown here. There may be other Kubernetes labels applied to the nodes in this group.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-labels

launch_template

An object representing a node group’s launch template specification.

If specified, then do not specify instanceTypes , diskSize , or remoteAccess and make sure that the launch template meets the requirements in launchTemplateSpecification .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-launchtemplate

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

node

The construct tree node associated with this construct.

node_role

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. 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 specify launchTemplate , then don’t specify `IamInstanceProfile <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html>`_ 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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-noderole

nodegroup_name

The unique name to give your node group.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-nodegroupname

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

release_version

//docs.aws.amazon.com/eks/latest/userguide/eks-linux-ami-versions.html>`_ in the Amazon EKS User Guide .

Changing this value triggers an update of the node group if one is available. You can’t update other properties at the same time as updating Release Version .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-releaseversion

Type:

The AMI version of the Amazon EKS optimized AMI to use with your node group (for example, 1.14.7- *YYYYMMDD* ). 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 <https

remote_access

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 specify remoteAccess , 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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-remoteaccess

scaling_config

The scaling configuration details for the Auto Scaling group that is created for your node group.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-scalingconfig

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

subnets

The subnets to use for the Auto Scaling group that is created for your node group.

If you specify launchTemplate , then don’t specify `SubnetId <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html>`_ 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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-subnets

tags

The metadata applied to the node group to assist with categorization and organization.

Each tag consists of a key and an optional value. You define both. Node group tags do not propagate to any other resources associated with the node group, such as the Amazon EC2 instances or subnets.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-tags

taints

The Kubernetes taints to be applied to the nodes in the node group when they are created.

Effect is one of No_Schedule , Prefer_No_Schedule , or No_Execute . Kubernetes taints can be used together with tolerations to control how workloads are scheduled to your nodes. For more information, see Node taints on managed node groups .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-taints

update_config

The node group update configuration.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-updateconfig

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 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 . .. epigraph:

You can't update other properties at the same time as updating ``Version`` .
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-version

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters:

construct (IConstruct) –

Return type:

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters:

x (Any) –

Return type:

bool

LaunchTemplateSpecificationProperty

class CfnNodegroup.LaunchTemplateSpecificationProperty(*, id=None, name=None, version=None)

Bases: object

An object representing a node group launch template specification.

The launch template can’t include `SubnetId <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html>`_ , `IamInstanceProfile <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html>`_ , `RequestSpotInstances <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html>`_ , `HibernationOptions <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_HibernationOptionsRequest.html>`_ , or `TerminateInstances <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_TerminateInstances.html>`_ , or the node group deployment or update will fail. For more information about launch templates, see `CreateLaunchTemplate <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html>`_ in the Amazon EC2 API Reference. For more information about using launch templates with Amazon EKS, see Launch template support in the Amazon EKS User Guide .

You must specify either the launch template ID or the launch template name in the request, but not both.

Parameters:
  • id (Optional[str]) – The ID of the launch template. You must specify either the launch template ID or the launch template name in the request, but not both.

  • name (Optional[str]) – The name of the launch template. You must specify either the launch template name or the launch template ID in the request, but not both.

  • version (Optional[str]) – The version number of the launch template to use. If no version is specified, then the template’s default version is used.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-launchtemplatespecification.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_eks_legacy as eks_legacy

launch_template_specification_property = eks_legacy.CfnNodegroup.LaunchTemplateSpecificationProperty(
    id="id",
    name="name",
    version="version"
)

Attributes

id

The ID of the launch template.

You must specify either the launch template ID or the launch template name in the request, but not both.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-launchtemplatespecification.html#cfn-eks-nodegroup-launchtemplatespecification-id

name

The name of the launch template.

You must specify either the launch template name or the launch template ID in the request, but not both.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-launchtemplatespecification.html#cfn-eks-nodegroup-launchtemplatespecification-name

version

The version number of the launch template to use.

If no version is specified, then the template’s default version is used.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-launchtemplatespecification.html#cfn-eks-nodegroup-launchtemplatespecification-version

RemoteAccessProperty

class CfnNodegroup.RemoteAccessProperty(*, ec2_ssh_key, source_security_groups=None)

Bases: object

An object representing the remote access configuration for the managed node group.

Parameters:
  • ec2_ssh_key (str) – The Amazon EC2 SSH key name that provides access for SSH communication with the nodes in the managed node group. For more information, see Amazon EC2 key pairs and Linux instances in the Amazon Elastic Compute Cloud User Guide for Linux Instances . For Windows, an Amazon EC2 SSH key is used to obtain the RDP password. For more information, see Amazon EC2 key pairs and Windows instances in the Amazon Elastic Compute Cloud User Guide for Windows Instances .

  • source_security_groups (Optional[Sequence[str]]) – The security group IDs that are allowed SSH access (port 22) to the nodes. For Windows, the port is 3389. If you specify an Amazon EC2 SSH key but don’t specify a source security group when you create a managed node group, then the port on the 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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-remoteaccess.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_eks_legacy as eks_legacy

remote_access_property = eks_legacy.CfnNodegroup.RemoteAccessProperty(
    ec2_ssh_key="ec2SshKey",

    # the properties below are optional
    source_security_groups=["sourceSecurityGroups"]
)

Attributes

ec2_ssh_key

The Amazon EC2 SSH key name that provides access for SSH communication with the nodes in the managed node group.

For more information, see Amazon EC2 key pairs and Linux instances in the Amazon Elastic Compute Cloud User Guide for Linux Instances . For Windows, an Amazon EC2 SSH key is used to obtain the RDP password. For more information, see Amazon EC2 key pairs and Windows instances in the Amazon Elastic Compute Cloud User Guide for Windows Instances .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-remoteaccess.html#cfn-eks-nodegroup-remoteaccess-ec2sshkey

source_security_groups

The security group IDs that are allowed SSH access (port 22) to the nodes.

For Windows, the port is 3389. If you specify an Amazon EC2 SSH key but don’t specify a source security group when you create a managed node group, then the port on the 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 .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-remoteaccess.html#cfn-eks-nodegroup-remoteaccess-sourcesecuritygroups

ScalingConfigProperty

class CfnNodegroup.ScalingConfigProperty(*, desired_size=None, max_size=None, min_size=None)

Bases: object

An object representing the scaling configuration details for the Auto Scaling group that is associated with your node group.

When creating a node group, you must specify all or none of the properties. When updating a node group, you can specify any or none of the properties.

Parameters:
  • desired_size (Union[int, float, None]) – The current number of nodes that the managed node group should maintain. .. epigraph:: If you use Cluster Autoscaler, you shouldn’t change the desiredSize value directly, as this can cause the Cluster Autoscaler to suddenly scale up or scale down. Whenever this parameter changes, the number of worker nodes in the node group is updated to the specified size. If this parameter is given a value that is smaller than the current number of running worker nodes, the necessary number of worker nodes are terminated to match the given value. When using CloudFormation, no action occurs if you remove this parameter from your CFN template. This parameter can be different from minSize in some cases, such as when starting with extra hosts for testing. This parameter can also be different when you want to start with an estimated number of needed hosts, but let Cluster Autoscaler reduce the number if there are too many. When Cluster Autoscaler is used, the desiredSize parameter is altered by Cluster Autoscaler (but can be out-of-date for short periods of time). Cluster Autoscaler doesn’t scale a managed node group lower than minSize or higher than maxSize.

  • max_size (Union[int, float, None]) – The maximum number of nodes that the managed node group can scale out to. For information about the maximum number that you can specify, see Amazon EKS service quotas in the Amazon EKS User Guide .

  • min_size (Union[int, float, None]) – The minimum number of nodes that the managed node group can scale in to.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-scalingconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_eks_legacy as eks_legacy

scaling_config_property = eks_legacy.CfnNodegroup.ScalingConfigProperty(
    desired_size=123,
    max_size=123,
    min_size=123
)

Attributes

desired_size

The current number of nodes that the managed node group should maintain.

If you use Cluster Autoscaler, you shouldn’t change the desiredSize value directly, as this can cause the Cluster Autoscaler to suddenly scale up or scale down.

Whenever this parameter changes, the number of worker nodes in the node group is updated to the specified size. If this parameter is given a value that is smaller than the current number of running worker nodes, the necessary number of worker nodes are terminated to match the given value. When using CloudFormation, no action occurs if you remove this parameter from your CFN template.

This parameter can be different from minSize in some cases, such as when starting with extra hosts for testing. This parameter can also be different when you want to start with an estimated number of needed hosts, but let Cluster Autoscaler reduce the number if there are too many. When Cluster Autoscaler is used, the desiredSize parameter is altered by Cluster Autoscaler (but can be out-of-date for short periods of time). Cluster Autoscaler doesn’t scale a managed node group lower than minSize or higher than maxSize.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-scalingconfig.html#cfn-eks-nodegroup-scalingconfig-desiredsize

max_size

The maximum number of nodes that the managed node group can scale out to.

For information about the maximum number that you can specify, see Amazon EKS service quotas in the Amazon EKS User Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-scalingconfig.html#cfn-eks-nodegroup-scalingconfig-maxsize

min_size

The minimum number of nodes that the managed node group can scale in to.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-scalingconfig.html#cfn-eks-nodegroup-scalingconfig-minsize

TaintProperty

class CfnNodegroup.TaintProperty(*, effect=None, key=None, value=None)

Bases: object

A property that allows a node to repel a set of pods.

For more information, see Node taints on managed node groups .

Parameters:
  • effect (Optional[str]) – The effect of the taint.

  • key (Optional[str]) – The key of the taint.

  • value (Optional[str]) – The value of the taint.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-taint.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_eks_legacy as eks_legacy

taint_property = eks_legacy.CfnNodegroup.TaintProperty(
    effect="effect",
    key="key",
    value="value"
)

Attributes

effect

The effect of the taint.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-taint.html#cfn-eks-nodegroup-taint-effect

key

The key of the taint.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-taint.html#cfn-eks-nodegroup-taint-key

value

The value of the taint.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-taint.html#cfn-eks-nodegroup-taint-value

UpdateConfigProperty

class CfnNodegroup.UpdateConfigProperty(*, max_unavailable=None, max_unavailable_percentage=None)

Bases: object

The update configuration for the node group.

Parameters:
  • max_unavailable (Union[int, float, None]) – The maximum number of nodes unavailable at once during a version update. Nodes will be updated in parallel. This value or maxUnavailablePercentage is required to have a value.The maximum number is 100.

  • max_unavailable_percentage (Union[int, float, None]) – The maximum percentage of nodes unavailable during a version update. This percentage of nodes will be updated in parallel, up to 100 nodes at once. This value or maxUnavailable is required to have a value.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-updateconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_eks_legacy as eks_legacy

update_config_property = eks_legacy.CfnNodegroup.UpdateConfigProperty(
    max_unavailable=123,
    max_unavailable_percentage=123
)

Attributes

max_unavailable

The maximum number of nodes unavailable at once during a version update.

Nodes will be updated in parallel. This value or maxUnavailablePercentage is required to have a value.The maximum number is 100.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-updateconfig.html#cfn-eks-nodegroup-updateconfig-maxunavailable

max_unavailable_percentage

The maximum percentage of nodes unavailable during a version update.

This percentage of nodes will be updated in parallel, up to 100 nodes at once. This value or maxUnavailable is required to have a value.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-updateconfig.html#cfn-eks-nodegroup-updateconfig-maxunavailablepercentage