Class FargateProfile
Fargate profiles allows an administrator to declare which pods run on Fargate.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.EKS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class FargateProfile : Construct, ITaggable
Syntax (vb)
Public Class FargateProfile
Inherits Construct
Implements ITaggable
Remarks
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.
ExampleMetadata: infused
Examples
Cluster cluster;
new FargateProfile(this, "MyProfile", new FargateProfileProps {
Cluster = cluster,
Selectors = new [] { new Selector { Namespace = "default" } }
});
Synopsis
Constructors
FargateProfile(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
FargateProfile(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
FargateProfile(Construct, String, IFargateProfileProps) |
Properties
FargateProfileArn | The full Amazon Resource Name (ARN) of the Fargate profile. |
FargateProfileName | The name of the Fargate profile. |
PodExecutionRole | The pod execution role to use for pods that match the selectors in the Fargate profile. |
Tags | Resource tags. |
Constructors
FargateProfile(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected FargateProfile(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
FargateProfile(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected FargateProfile(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
FargateProfile(Construct, String, IFargateProfileProps)
public FargateProfile(Construct scope, string id, IFargateProfileProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IFargateProfileProps
Properties
FargateProfileArn
The full Amazon Resource Name (ARN) of the Fargate profile.
public virtual string FargateProfileArn { get; }
Property Value
System.String
Remarks
Attribute: true
FargateProfileName
The name of the Fargate profile.
public virtual string FargateProfileName { get; }
Property Value
System.String
Remarks
Attribute: true
PodExecutionRole
The pod execution role to use for pods that match the selectors in the Fargate profile.
public virtual IRole PodExecutionRole { get; }
Property Value
Remarks
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.