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.
How EKS works
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.
| Need | Integration |
|---|---|
| AWS permissions per pod | EKS Pod Identity or IAM roles for service accounts (IRSA) |
| Load balancing | AWS Load Balancer Controller creates ALBs and NLBs |
| Pod networking | The VPC CNI gives pods VPC IP addresses, so subnets need room |
| Storage | EBS and EFS CSI drivers |
EKS integrations
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.
| Choose | When |
|---|---|
| ECS | Simplicity and deep AWS integration, with no Kubernetes expertise needed |
| EKS | Kubernetes tooling, portability across environments, or existing Kubernetes workloads |
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.
| Approach | Scope of access |
|---|---|
| Add S3 permissions to the node's instance role | Every pod on every node: too broad |
| Store access keys in a Kubernetes secret | Long-term keys to protect and rotate: avoid |
| EKS Pod Identity for the pod's service account | Only 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.
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.