CapacityType

class aws_cdk.aws_eks.CapacityType(value)

Bases: Enum

Capacity type of the managed node group.

ExampleMetadata:

infused

Example:

# cluster: eks.Cluster

cluster.add_nodegroup_capacity("extra-ng-spot",
    instance_types=[
        ec2.InstanceType("c5.large"),
        ec2.InstanceType("c5a.large"),
        ec2.InstanceType("c5d.large")
    ],
    min_size=3,
    capacity_type=eks.CapacityType.SPOT
)

Attributes

ON_DEMAND

on-demand instances.

SPOT

spot instances.