aws-cdk-lib.aws_eks.AutoScalingGroupOptions

interface AutoScalingGroupOptions

LanguageType name
.NETAmazon.CDK.AWS.EKS.AutoScalingGroupOptions
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awseks#AutoScalingGroupOptions
Javasoftware.amazon.awscdk.services.eks.AutoScalingGroupOptions
Pythonaws_cdk.aws_eks.AutoScalingGroupOptions
TypeScript (source)aws-cdk-lib » aws_eks » AutoScalingGroupOptions

Options for adding an AutoScalingGroup as capacity.

Example

declare const cluster: eks.Cluster;
declare const asg: autoscaling.AutoScalingGroup;
cluster.connectAutoScalingGroupCapacity(asg, {});

Properties

NameTypeDescription
bootstrapEnabled?booleanConfigures 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.
bootstrapOptions?BootstrapOptionsAllows options for node bootstrapping through EC2 user data.
machineImageType?MachineImageTypeAllow options to specify different machine image type.
mapRole?booleanWill automatically update the aws-auth ConfigMap to map the IAM instance role to RBAC.
spotInterruptHandler?booleanInstalls the AWS spot instance interrupt handler on the cluster if it's not already added.

bootstrapEnabled?

Type: boolean (optional, default: true)

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 invoke autoscalingGroup.addUserData().


bootstrapOptions?

Type: BootstrapOptions (optional, default: default options)

Allows options for node bootstrapping through EC2 user data.


machineImageType?

Type: MachineImageType (optional, default: MachineImageType.AMAZON_LINUX_2)

Allow options to specify different machine image type.


mapRole?

Type: boolean (optional, default: true if the cluster has kubectl enabled (which is the default).)

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.


spotInterruptHandler?

Type: boolean (optional, default: true)

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.