FargateProfileOptions
- class aws_cdk.aws_eks_v2_alpha.FargateProfileOptions(*, selectors, fargate_profile_name=None, pod_execution_role=None, removal_policy=None, subnet_selection=None, vpc=None)
Bases:
object(experimental) Options for defining EKS Fargate Profiles.
- Parameters:
selectors (
Sequence[Union[Selector,Dict[str,Any]]]) – (experimental) 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]) – (experimental) The name of the Fargate profile. Default: - generatedpod_execution_role (
Optional[IRole]) – (experimental) 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 createdremoval_policy (
Optional[RemovalPolicy]) – (experimental) The removal policy applied to the custom resource that manages the Fargate profile. 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 Default: RemovalPolicy.DESTROYsubnet_selection (
Union[SubnetSelection,Dict[str,Any],None]) – (experimental) 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]) – (experimental) The VPC from which to select subnets to launch your pods into. By default, all private subnets are selected. You can customize this usingsubnetSelection. Default: - all private subnets used by the EKS cluster
- Stability:
experimental
- ExampleMetadata:
infused
Example:
cluster = eks.Cluster(self, "ManagedNodeCluster", version=eks.KubernetesVersion.V1_34, default_capacity_type=eks.DefaultCapacityType.NODEGROUP ) # Add a Fargate Profile for specific workloads (e.g., default namespace) cluster.add_fargate_profile("FargateProfile", selectors=[eks.Selector(namespace="default") ] )
Attributes
- fargate_profile_name
(experimental) The name of the Fargate profile.
- Default:
generated
- Stability:
experimental
- pod_execution_role
(experimental) 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
- Stability:
experimental
- removal_policy
(experimental) The removal policy applied to the custom resource that manages the Fargate profile.
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
- Default:
RemovalPolicy.DESTROY
- Stability:
experimental
- selectors
(experimental) 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.
- Stability:
experimental
- subnet_selection
(experimental) 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.
- Stability:
experimental
- vpc
(experimental) 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
- Stability:
experimental