aws-cdk-lib.aws_eks.FargateProfileOptions

interface FargateProfileOptions

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

Options for defining EKS Fargate Profiles.

Example

declare const cluster: eks.Cluster;
cluster.addFargateProfile('MyProfile', {
  selectors: [ { namespace: 'default' } ],
});

Properties

NameTypeDescription
selectorsSelector[]The selectors to match for pods to use this Fargate profile.
fargateProfileName?stringThe name of the Fargate profile.
podExecutionRole?IRoleThe pod execution role to use for pods that match the selectors in the Fargate profile.
subnetSelection?SubnetSelectionSelect which subnets to launch your pods into.
vpc?IVpcThe VPC from which to select subnets to launch your pods into.

selectors

Type: Selector[]

The selectors to match for pods to use this Fargate profile.

Each selector must have an associated namespace. Optionally, you can also specify labels for a namespace.

At least one selector is required and you may specify up to five selectors.


fargateProfileName?

Type: string (optional, default: generated)

The name of the Fargate profile.


podExecutionRole?

Type: IRole (optional, default: a role will be automatically created)

The pod execution role to use for pods that match the selectors in the Fargate profile.

The pod execution role allows Fargate infrastructure to register with your cluster as a node, and it provides read access to Amazon ECR image repositories.

See also: https://docs.aws.amazon.com/eks/latest/userguide/pod-execution-role.html


subnetSelection?

Type: SubnetSelection (optional, default: all private subnets of the VPC are selected.)

Select which subnets to launch your pods into.

At this time, pods running on Fargate are not assigned public IP addresses, so only private subnets (with no direct route to an Internet Gateway) are allowed.

You must specify the VPC to customize the subnet selection


vpc?

Type: IVpc (optional, default: all private subnets used by the EKS cluster)

The VPC from which to select subnets to launch your pods into.

By default, all private subnets are selected. You can customize this using subnetSelection.