Class FargateProfile

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.services.eks.FargateProfile
All Implemented Interfaces:
ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:01.453Z") @Stability(Stable) public class FargateProfile extends software.constructs.Construct implements ITaggable
Fargate profiles allows an administrator to declare which pods run on Fargate.

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();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for FargateProfile.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy

    Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable

    ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    FargateProfile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    FargateProfile(software.amazon.jsii.JsiiObjectRef objRef)
     
     
    FargateProfile(software.constructs.Construct scope, String id, FargateProfileProps props)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The full Amazon Resource Name (ARN) of the Fargate profile.
    The name of the Fargate profile.
    The pod execution role to use for pods that match the selectors in the Fargate profile.
    Resource tags.

    Methods inherited from class software.constructs.Construct

    getNode, isConstruct, toString

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • FargateProfile

      protected FargateProfile(software.amazon.jsii.JsiiObjectRef objRef)
    • FargateProfile

      protected FargateProfile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • FargateProfile

      @Stability(Stable) public FargateProfile(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull FargateProfileProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • getFargateProfileArn

      @Stability(Stable) @NotNull public String getFargateProfileArn()
      The full Amazon Resource Name (ARN) of the Fargate profile.
    • getFargateProfileName

      @Stability(Stable) @NotNull public String getFargateProfileName()
      The name of the Fargate profile.
    • getPodExecutionRole

      @Stability(Stable) @NotNull public IRole getPodExecutionRole()
      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.

    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Resource tags.
      Specified by:
      getTags in interface ITaggable