aws-cdk-lib.aws_eks.FargateProfileProps

interface FargateProfileProps

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

Configuration props for EKS Fargate Profiles.

Example

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

Properties

NameTypeDescription
clusterClusterThe EKS cluster to apply the Fargate profile to.
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.

cluster

Type: Cluster

The EKS cluster to apply the Fargate profile to.

[disable-awslint:ref-via-interface]


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.