FargateProfileOptions

class aws_cdk.aws_eks.FargateProfileOptions(*, selectors, fargate_profile_name=None, pod_execution_role=None, subnet_selection=None, vpc=None)

Bases: object

Options for defining EKS Fargate Profiles.

Parameters:
  • selectors (Sequence[Union[Selector, Dict[str, Any]]]) – 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.

  • fargate_profile_name (Optional[str]) – The name of the Fargate profile. Default: - generated

  • pod_execution_role (Optional[IRole]) – 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. Default: - a role will be automatically created

  • subnet_selection (Union[SubnetSelection, Dict[str, Any], None]) – 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 Default: - all private subnets of the VPC are selected.

  • vpc (Optional[IVpc]) – 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. Default: - all private subnets used by the EKS cluster

ExampleMetadata:

infused

Example:

# cluster: eks.Cluster

cluster.add_fargate_profile("MyProfile",
    selectors=[eks.Selector(namespace="default")]
)

Attributes

fargate_profile_name

The name of the Fargate profile.

Default:
  • generated

pod_execution_role

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.

Default:
  • a role will be automatically created

See:

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

selectors

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.

subnet_selection

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

Default:
  • all private subnets of the VPC are selected.

vpc

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.

Default:
  • all private subnets used by the EKS cluster