Amazon EKS
Amazon EKS as managed Kubernetes, how a cluster is laid out, node types including EKS Auto Mode, storage with CSI drivers, and running containers on premises with ECS Anywhere, EKS Anywhere and EKS Distro.
What it is
Amazon EKS (Elastic Kubernetes Service) launches managed Kubernetes clusters on AWS.
- Kubernetes is an open-source system for the automatic deployment, scaling and management of containerized (usually Docker) applications.
- It's an alternative to ECS: a similar goal, but a different API.
- EKS supports EC2 worker nodes, or Fargate for serverless containers.
- Use case: a company already uses Kubernetes on premises or in another cloud, and wants to move to AWS while keeping Kubernetes.
- Kubernetes is cloud-agnostic: it runs on any cloud (Azure, Google Cloud…), so the same tools and manifests work everywhere.
- For multiple Regions, deploy one EKS cluster per Region.
- Collect logs and metrics with CloudWatch Container Insights.
AWS runs the control plane (the Kubernetes API servers and their database) across several AZs; the customer runs workloads as pods on the worker capacity. A typical cluster puts worker nodes in private subnets in several AZs, with load balancers in public subnets for internet traffic and NAT gateways for outbound access.
Node types
- Managed node groups:
- EKS creates and manages the nodes (EC2 instances);
- nodes are part of an ASG managed by EKS;
- supports On-Demand or Spot Instances.
- Self-managed nodes:
- nodes the customer creates and registers to the EKS cluster, managed by an ASG;
- a prebuilt AMI is available: the Amazon EKS-optimized AMI;
- supports On-Demand or Spot Instances.
- AWS Fargate:
- no maintenance required; no nodes managed.
- EKS Auto Mode:
- AWS manages the nodes too: compute autoscaling, OS patching, pod networking, load balancer integration and storage drivers;
- the customer looks after the application containers.
Updated since the slides
EKS Auto Mode is newer than the course slides. It sits between managed node groups and Fargate: EC2-based, but with AWS running the nodes. On the exam, "least operational overhead for Kubernetes" still most often points to Fargate or managed node groups.
Data volumes
- A StorageClass manifest is specified on the EKS cluster.
- It uses a Container Storage Interface (CSI)-compliant driver.
- Supported storage includes:
- Amazon EBS;
- Amazon EFS (the one that works with Fargate);
- Amazon FSx for Lustre;
- Amazon FSx for NetApp ONTAP;
- also Amazon S3, S3 Files and File Cache.
Running containers outside AWS Regions
- ECS Anywhere: run ECS tasks on the customer's own servers or VMs (registered as external instances through the Systems Manager agent), with the ECS control plane in AWS. Manage on-premises and cloud containers the same way.
- EKS Anywhere: run whole Kubernetes clusters in the customer's own data centre (VMware vSphere, bare metal, Nutanix and more), with the control plane and nodes on the customer's hardware. It can even run disconnected (air-gapped).
- EKS Distro (EKS-D): the open-source Kubernetes distribution that EKS itself uses, with the same versions and patches. The customer installs and runs it, with their own tools; AWS support plans don't cover it.
- EKS Hybrid Nodes (newer) lets on-premises machines join an EKS cluster whose control plane runs in AWS.
Not in the course slides
ECS Anywhere, EKS Anywhere and EKS Distro are on the exam guide's in-scope list but not in the course slides. This section is written from the AWS documentation.
Real-world examples
- A retailer runs Kubernetes in its data centre and on Google Cloud; it moves to EKS with the same Helm charts and manifests.
- A bank runs managed node groups on Spot for batch jobs and Fargate for small internal services.
- A factory needs containers next to its machines with no internet link; it runs EKS Anywhere on site.
Exam tips
- "Already using Kubernetes", "migrate Kubernetes workloads", "cloud-agnostic containers" → EKS.
- "Kubernetes without managing nodes" → EKS on Fargate (or EKS Auto Mode).
- "Nodes managed by AWS, On-Demand or Spot" → managed node groups.
- "Persistent storage for EKS pods on Fargate" → EFS.
- "Manage on-premises containers with the ECS control plane" → ECS Anywhere.
- "Kubernetes in our own data centre, supported by AWS, even disconnected" → EKS Anywhere.
- "Same Kubernetes as EKS, self-managed anywhere" → EKS Distro.
Common traps
- "EKS uses the ECS API." EKS uses the standard Kubernetes API.
- "EBS volumes for Fargate pods." Fargate pods use EFS.
- "One EKS cluster can span Regions." Use one cluster per Region.
Check yourself
An EKS cluster costs $0.10 an hour for the control plane alone, before any nodes, so instead of a lab:
Amazon EKS: it's certified Kubernetes-conformant, so existing manifests and tools work; use managed node groups or Fargate for the workers.
ECS Anywhere: register the on-premises servers as external instances; the ECS control plane in AWS schedules tasks on them.
AWS documentation
- What is Amazon EKS?
- Manage compute resources by using nodes
- Automate cluster infrastructure with EKS Auto Mode
- Simplify node lifecycle with managed node groups
- Simplify compute management with AWS Fargate
- Use application data storage for your cluster
- Deploy Amazon EKS clusters across cloud and on-premises environments
- Amazon ECS Anywhere