AWS Fargate for EKS (Fargate) provides on-demand, right-sized compute capacity for Kubernetes pods. With Fargate, you no longer need to provision, configure, or scale groups of virtual machines to run your pods. This removes the need to choose server types, decide when to scale your node groups, or optimize cluster packing. You can control which pods start on Fargate and how they run using Fargate profiles, which are defined as part of your Amazon EKS cluster.
In Nirmata, you can automate the creation of Fargate profiles for EKS clusters. This enables you to deliver Namespace-as-a-service to your developers without requiring any admin intervention.
Detailed prerequisites to setup Fargate for EKS can be found here
To enable Fargate on your cluster, you need to do the following in Nirmata:
- Enable Fargate: Enable Fargate in your EKS cluster type.
- Configure Default Settings: Configure default settings that will be used whenever a Fargate profile is automatically created
- Pod Execution Role ARN: Specify the default Pod Execution Role ARN.
- Subnets: Specify the subnets where your Fargate pods will be running.
- Namespace Label Selectors: Label selector for namespaces to enable Fargate for EKS.
- Pod Label Selectors: Label selector for pods to be added to the Fargate profile.
Now, any cluster created using this cluster type will have the default Fargate settings configured.
To enable Fargate to be used when deploying applications on EKS clusters, you need to do the following:
- Create an Environment Type and specify the label to be applied to the namespace so that Fargate is enabled.
- Create an Environment using the above Environment type.
When an Environment is created, the labels from the Environment Type will be applied to the namespace for that Environment. This will initiate the creation of the Fargate profile for this namespace. Once the Fargate profile is created, any pods deployed in this namespace will use AWS Fargate to automatically provision the required nodes.
Note: It could take up to a minute for the Fargate profile to be created and active on AWS. Any pods deployed before the Fargate profile is created will be deployed on existing nodes. Once the Fargate profile is active, you can delete the pods so that they can be redeployed on automatically provisioned nodes.