FargateProfileOptions Struct
Options for defining EKS Fargate Profiles.
Example
const cluster = new eks.Cluster(this, 'ManagedNodeCluster', {
version: eks.KubernetesVersion.V1_36,
defaultCapacityType: eks.DefaultCapacityType.NODEGROUP,
});
// Add a Fargate Profile for specific workloads (e.g., default namespace)
cluster.addFargateProfile('FargateProfile', {
selectors: [
{ namespace: 'default' }, // Run pods in 'default' on Fargate
],
});
Properties
fargateProfileNameoptionalstringfargate_profile_nameoptionalstrfargateProfileNameoptionalStringFargateProfileNameoptionalstringFargateProfileNameoptional*string= generated#podExecutionRoleoptionalIRolepod_execution_roleoptionalIRolepodExecutionRoleoptionalIRolePodExecutionRoleoptionalIRolePodExecutionRoleoptionalIRole#Default: a role will be automatically created
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.
removalPolicyoptionalRemovalPolicyremoval_policyoptionalRemovalPolicyremovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicy= RemovalPolicy.DESTROY#notes
The removal policy controls what happens to the resource if it stops being managed by CloudFormation. This can happen in one of three situations:
- The resource is removed from the template, so CloudFormation stops managing it
- A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it
- The stack is deleted, so CloudFormation stops managing all resources in it
selectorsSelector[]selectorstyping.List[Selector]selectorsList<Selector>SelectorsSelector[]Selectors*[]Selectorrequired#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.
subnetSelectionoptionalSubnetSelectionsubnet_selectionoptionalSubnetSelectionsubnetSelectionoptionalSubnetSelectionSubnetSelectionoptionalSubnetSelectionSubnetSelectionoptionalSubnetSelection#Default: all private subnets of the VPC are selected.
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