@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)", date="2022-08-17T17:31:20.401Z") public class FargateProfile extends Construct implements ITaggable
This declaration is done through the profile’s selectors. Each profile can have up to five selectors that contain a namespace and optional labels. You must define a namespace for every selector. The label field consists of multiple optional key-value pairs. Pods that match a selector (by matching a namespace for the selector and all of the labels specified in the selector) are scheduled on Fargate. If a namespace selector is defined without any labels, Amazon EKS will attempt to schedule all pods that run in that namespace onto Fargate using the profile. If a to-be-scheduled pod matches any of the selectors in the Fargate profile, then that pod is scheduled on Fargate.
If a pod matches multiple Fargate profiles, Amazon EKS picks one of the matches at random. In this case, you can specify which profile a pod should use by adding the following Kubernetes label to the pod specification: eks.amazonaws.com/fargate-profile: profile_name. However, the pod must still match a selector in that profile in order to be scheduled onto Fargate.
Example:
Cluster cluster; FargateProfile.Builder.create(this, "MyProfile") .cluster(cluster) .selectors(List.of(Selector.builder().namespace("default").build())) .build();
Modifier and Type | Class and Description |
---|---|
static class |
FargateProfile.Builder
A fluent builder for
FargateProfile . |
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
IConstruct.Jsii$Default, IConstruct.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
FargateProfile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
FargateProfile(software.amazon.jsii.JsiiObjectRef objRef) |
|
FargateProfile(software.constructs.Construct scope,
java.lang.String id,
FargateProfileProps props) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFargateProfileArn()
The full Amazon Resource Name (ARN) of the Fargate profile.
|
java.lang.String |
getFargateProfileName()
The name of the Fargate profile.
|
IRole |
getPodExecutionRole()
The pod execution role to use for pods that match the selectors in the Fargate profile.
|
TagManager |
getTags()
Resource tags.
|
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
protected FargateProfile(software.amazon.jsii.JsiiObjectRef objRef)
protected FargateProfile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public FargateProfile(software.constructs.Construct scope, java.lang.String id, FargateProfileProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public java.lang.String getFargateProfileArn()
public java.lang.String getFargateProfileName()
public IRole getPodExecutionRole()
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.
public TagManager getTags()