Lesson 2 of 6 Amazon ECS, EKS and Fargate

Running Kubernetes with Amazon EKS

This lesson explains how Amazon EKS runs managed Kubernetes control planes, so teams that use Kubernetes can run workloads on AWS with standard tools.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe how EKS manages the control plane.
  • Explain how EKS Pod Identity and IRSA give pods AWS permissions.
  • Choose between ECS and EKS.

How EKS works

Amazon EKS runs the Kubernetes control plane as a managed service: AWS operates and scales it across several Availability Zones, so the customer never manages the API servers or the cluster database. Workloads run as pods on nodes, which can come from managed node groups, self-managed nodes, Karpenter, which provisions nodes to fit pending pods, EKS Auto Mode, in which AWS manages the nodes entirely, or AWS Fargate, which runs each pod without nodes.

Applications are deployed with standard Kubernetes tools, such as manifests, kubectl and Helm, so teams can reuse their existing Kubernetes skills and configurations. EKS is charged per cluster per hour, plus the compute that the pods use.

True or false

How EKS works

Exam skills 2.1.4

Check how Amazon EKS runs Kubernetes.

Log in to try this activity Interactive activities are free with an account.

AWS integrations

EKS runs standard Kubernetes, and several integrations connect it to AWS. EKS Pod Identity, or IAM roles for service accounts (IRSA), gives each pod its own IAM role, so applications get least-privilege AWS permissions instead of sharing the node's role. The AWS Load Balancer Controller creates Application Load Balancers for Kubernetes Ingress resources and Network Load Balancers for services of type LoadBalancer.

The VPC CNI plug-in gives every pod an IP address from the VPC, so pods are directly reachable on the network, but subnets must have enough free addresses for every pod. The EBS and EFS CSI drivers provide persistent volumes to pods, EBS for storage attached to one pod and EFS for storage shared by many. The following table summarises the integrations.

NeedIntegration
AWS permissions per podEKS Pod Identity or IAM roles for service accounts (IRSA)
Load balancingAWS Load Balancer Controller creates ALBs and NLBs
Pod networkingThe VPC CNI gives pods VPC IP addresses, so subnets need room
StorageEBS and EFS CSI drivers
Match the pairs

EKS integrations

Exam skills 2.1.4

Match each EKS need with the AWS integration that meets it.

Log in to try this activity Interactive activities are free with an account.

ECS or EKS?

ECS and EKS both run containers on EC2 or Fargate, so the choice is about the orchestrator. ECS is AWS's own orchestrator, with fewer concepts and deep integration with other AWS services; a team needs no Kubernetes expertise, and there is no charge for the control plane. EKS runs standard Kubernetes, so it suits teams that already use Kubernetes, want its ecosystem of tools, or need workloads that can move between AWS, other clouds and on premises, at the cost of more complexity and a charge per cluster. The following table summarises the choice.

ChooseWhen
ECSSimplicity and deep AWS integration, with no Kubernetes expertise needed
EKSKubernetes tooling, portability across environments, or existing Kubernetes workloads
Worked example

Giving one pod access to S3

AWS permissions may be granted to a pod in several ways, which differ considerably in scope and security. The following table compares the approaches.

ApproachScope of access
Add S3 permissions to the node's instance roleEvery pod on every node: too broad
Store access keys in a Kubernetes secretLong-term keys to protect and rotate: avoid
EKS Pod Identity for the pod's service accountOnly pods using that service account

With Pod Identity, the AWS SDK in the pod receives temporary credentials for its own role, giving each application least privilege on shared nodes.

Check yourself

When is EKS a better choice than ECS?

Show answer

When the team already uses Kubernetes or needs Kubernetes tools and portability. ECS is simpler for teams without Kubernetes experience.

Exam Tips

Remember for the exam

  • For existing Kubernetes workloads, use EKS.
  • To give a pod its own AWS permissions, use EKS Pod Identity or IRSA.
  • To avoid managing Kubernetes worker nodes, use EKS Auto Mode or Fargate.
  • For simpler container orchestration without Kubernetes, use ECS.