Ravindra BagaleCourses & study guides मराठी

Chapter 88: Amazon EKS for DevOps

DevOps

88.3 Node groups vs Fargate profiles

Story. A Nykaa-style shop team in Mumbai ran checkout on managed node groups (EC2). Batch image-resize jobs went to a Fargate profile so they did not steal CPU from checkout nodes. Node groups gave them GPU and DaemonSets later. Fargate removed SSH and AMI patching for the batch pods. They paid more per vCPU on Fargate but saved ops hours. Rough lab note: a small t3.medium node might be a few USD per day — check current EC2 and Fargate prices before you compare.

Managed node group runs pods on EC2. Fargate profile runs matching pods without node SSH.
Managed node group runs pods on EC2. Fargate profile runs matching pods without node SSH.

Why

Not every workload needs the same compute model. Checkout wants predictable nodes. Burst batch work often wants less node ops.

What

  • Managed node group — AWS manages an Auto Scaling group of EC2 workers joined to the cluster.
  • Self-managed nodes — You own the ASG and bootstrap (more control, more work).
  • Fargate profile — Selectors (namespace and labels) that run matching pods on EKS Fargate.
  • DaemonSet — Needs a real node. Fargate does not run DaemonSets the same way.

How

  1. Put steady services on a managed node group sized for peak plus buffer.
  2. Put selected namespaces or labels on a Fargate profile when you want no node SSH.
  3. Remember Cluster Autoscaler or Karpenter patterns for node groups (awareness from Kubernetes chapters).
  4. Watch Cost Explorer — Fargate and EC2 price differently.

Example 1: List node groups

aws eks list-nodegroups --cluster-name shop-lab --region ap-south-1

Output

{
    "nodegroups": [
        "ng-m5"
    ]
}

What it shows: One managed node group named ng-m5 is registered on the cluster.

Example 2: Fargate profile selector shape

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
  name: shop-lab
  region: ap-south-1
fargateProfiles:
  - name: fp-batch
    selectors:
      - namespace: batch
        labels:
          compute: fargate

What it shows: Pods in namespace batch with label compute=fargate can run on Fargate. Other pods still use node groups.

Ravindra Bagale's Tip

Need node-local agents or DaemonSets? Prefer node groups. Want less AMI work for a namespace? Consider Fargate.

Quick quiz

Q1. What is a managed node group?

AWS-managed EC2 Auto Scaling workers joined to your EKS cluster.

Q2. What does a Fargate profile select?

Namespaces and labels whose pods should run on EKS Fargate.

Q3. Why might DaemonSets need node groups?

They expect real nodes; Fargate is a different compute path.

Did you understand? Let us try it once more.