AutoScalingGroupOptions¶
-
class
aws_cdk.aws_eks.
AutoScalingGroupOptions
(*, bootstrap_enabled=None, bootstrap_options=None, machine_image_type=None, map_role=None, spot_interrupt_handler=None)¶ Bases:
object
Options for adding an AutoScalingGroup as capacity.
- Parameters
bootstrap_enabled (
Optional
[bool
]) – Configures the EC2 user-data script for instances in this autoscaling group to bootstrap the node (invoke/etc/eks/bootstrap.sh
) and associate it with the EKS cluster. If you wish to provide a custom user data script, set this tofalse
and manually invokeautoscalingGroup.addUserData()
. Default: truebootstrap_options (
Optional
[BootstrapOptions
]) – Allows options for node bootstrapping through EC2 user data. Default: - default optionsmachine_image_type (
Optional
[MachineImageType
]) – Allow options to specify different machine image type. Default: MachineImageType.AMAZON_LINUX_2map_role (
Optional
[bool
]) – Will automatically update the aws-auth ConfigMap to map the IAM instance role to RBAC. This cannot be explicitly set totrue
if the cluster has kubectl disabled. Default: - true if the cluster has kubectl enabled (which is the default).spot_interrupt_handler (
Optional
[bool
]) – Installs the AWS spot instance interrupt handler on the cluster if it’s not already added. Only relevant ifspotPrice
is configured on the auto-scaling group. Default: true
- ExampleMetadata
infused
Example:
# cluster: eks.Cluster # asg: autoscaling.AutoScalingGroup cluster.connect_auto_scaling_group_capacity(asg)
Attributes
-
bootstrap_enabled
¶ Configures the EC2 user-data script for instances in this autoscaling group to bootstrap the node (invoke
/etc/eks/bootstrap.sh
) and associate it with the EKS cluster.If you wish to provide a custom user data script, set this to
false
and manually invokeautoscalingGroup.addUserData()
.- Default
true
- Return type
Optional
[bool
]
-
bootstrap_options
¶ Allows options for node bootstrapping through EC2 user data.
- Default
default options
- Return type
Optional
[BootstrapOptions
]
-
machine_image_type
¶ Allow options to specify different machine image type.
- Default
MachineImageType.AMAZON_LINUX_2
- Return type
Optional
[MachineImageType
]
-
map_role
¶ Will automatically update the aws-auth ConfigMap to map the IAM instance role to RBAC.
This cannot be explicitly set to
true
if the cluster has kubectl disabled.- Default
true if the cluster has kubectl enabled (which is the default).
- Return type
Optional
[bool
]
-
spot_interrupt_handler
¶ Installs the AWS spot instance interrupt handler on the cluster if it’s not already added.
Only relevant if
spotPrice
is configured on the auto-scaling group.- Default
true
- Return type
Optional
[bool
]