Ravindra BagaleCourses & study guides मराठी Track your progress

What Is Amazon EKS? Kubernetes on AWS Explained

Kubernetes is like a city traffic police for thousands of containers. Amazon EKS gives you a managed control plane so you do not run etcd and API servers yourself. It is powerful — and heavier than ECS for most student labs.

What you'll learn in this chapter

  • Why Kubernetes exists
  • What EKS manages vs what you manage
  • EKS vs ECS vs self-managed k8s
  • Cost warnings — control plane is not free
  • When to choose EKS

1. Everyday example

Why do we need this?

Instagram-scale teams run hundreds of microservices. They want one API (kubectl) to deploy, scale and heal pods across clouds and on-prem. That API is Kubernetes.

What is it?

Amazon EKS (Elastic Kubernetes Service) runs the Kubernetes control plane for you (API server, etcd, scheduler). You add worker nodes (EC2 or Fargate) where pods run.

EKS high levelkubectl / CItalks to EKS APIEKS control planeschedules podsWorker nodesEC2 or Fargate run podsPods talk toALB / RDS / S3
You still design networking, IAM (IRSA), and node upgrades.

2. Control plane vs data plane

PieceWho runs it on EKSNotes
API server, etcd, schedulerAWS (multi-AZ)You pay a flat control-plane hourly fee
Worker nodesYou — managed node group, self-managed, or FargateWhere CPU/memory of pods is billed
Add-ons (CNI, CoreDNS, kube-proxy)AWS add-ons or your chartsKeep versions compatible

3. EKS vs ECS vs DIY Kubernetes

  • ECS: simpler AWS-native model (services/tasks). Best default on AWS if you are not already a k8s shop.
  • EKS: full k8s API, Helm, operators, multi-cloud skills. More moving parts.
  • DIY k8s on EC2: you own etcd backups and upgrades — rarely worth it.

Ravindra Bagale's Tip

Do not start EKS “because LinkedIn says Kubernetes”. Start with ECS/Fargate unless your job or multi-cloud plan needs kubectl.

4. Cost warnings

Money

EKS control plane has an hourly charge per cluster even with zero pods. Worker nodes and Load Balancers add more. Delete lab clusters the same day. Prefer ECS Fargate for cheap Docker labs.

5. Interview angles

Q. What does EKS manage?

The Kubernetes control plane.

Q. Where do pods run?

On worker nodes (EC2) or EKS Fargate.

Q. EKS vs ECS?

EKS = Kubernetes API; ECS = AWS tasks/services.

Q. IRSA?

IAM Roles for Service Accounts — pods get IAM without node keys.

Q. Why not DIY control plane?

HA etcd and upgrades are hard; EKS does that.

Try at home

  1. Compare price of 1 EKS cluster idle vs 1 Fargate nginx task for 2 hours.
  2. Read AWS docs on EKS managed node groups (no need to create yet).

In short

  1. EKS = managed Kubernetes control plane on AWS.
  2. You still run or pay for workers.
  3. Heavier than ECS; powerful when you need k8s.
  4. Delete idle clusters — control plane is billed.

Practice Tasks

About this scenario

Nairobi Ride is a transport business in Nairobi. Wanjiru Kamau looks after its IT and cloud work. They count money in KES and run their AWS resources in the af-south-1 Region. In the tasks below you do real jobs for them using what this lesson teaches. All names, account IDs, IP addresses and numbers are made up for practice.

0 / 10

Easy Describe an EKS cluster

Why: Check the version, status and endpoint of the cluster.

What to do: Describe cluster nairobiride-eks.

How:
  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Easy How many addresses in a /16?

Why: Picking a VPC size needs this count.

What to do: Nairobi Ride plans the VPC 10.205.0.0/16. How many IP addresses does it hold in total?

How:
  1. Write down the numbers the task gives you.
  2. Work it out step by step on paper.
  3. Type only the final answer in the box.
  4. Click Check answer.

Easy Port for SSH

Why: Security group rules need the right port.

What to do: Which TCP port must the security group open for SSH?

How:
  1. Write down the numbers the task gives you.
  2. Work it out step by step on paper.
  3. Type only the final answer in the box.
  4. Click Check answer.

Easy Show where you are

Why: Before you copy or delete anything, you must know which folder you are in.

What to do: Wanjiru Kamau logged in to the Nairobi Ride server and is not sure which folder the terminal is in. Print the current folder path.

How:
  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Medium Kubernetes Deployment

Why: A Deployment keeps the right number of pods running.

What to do: Write a Deployment named nairobiride-web with 3 replicas running image nginx:1.27.

How:
  1. Start from the top-level keys the task names.
  2. Indent child keys with 2 spaces (no tabs).
  3. Fill in each property with the value from the task.
  4. Click Check answer. Key order does not matter.

Medium Connect kubectl to EKS

Why: update-kubeconfig writes the cluster details so kubectl can talk to it.

What to do: Update your kubeconfig for cluster nairobiride-eks in af-south-1.

How:
  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Medium Kubernetes LoadBalancer Service

Why: A Service of type LoadBalancer gets an AWS load balancer.

What to do: Write a Service of type LoadBalancer selecting app: web, port 80 to targetPort 8080.

How:
  1. Start from the top-level keys the task names.
  2. Indent child keys with 2 spaces (no tabs).
  3. Fill in each property with the value from the task.
  4. Click Check answer. Key order does not matter.

Medium Usable IPs in an AWS /24 subnet

Why: AWS keeps 5 addresses in every subnet.

What to do: How many addresses can Nairobi Ride use for servers in subnet 10.205.1.0/24 on AWS?

How:
  1. Write down the numbers the task gives you.
  2. Work it out step by step on paper.
  3. Type only the final answer in the box.
  4. Click Check answer.

Hard Create an EKS cluster

Why: The control plane needs a role and subnets to place its network interfaces.

What to do: Create cluster nairobiride-eks with role arn:aws:iam::104591109902:role/eksClusterRole and subnets subnet-0045d110dd02bb1,subnet-045d110dd02bb2.

How:
  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Hard Add a managed node group

Why: Node groups are the EC2 servers that run your pods.

What to do: Create node group ng-1 in cluster nairobiride-eks with role arn:aws:iam::104591109902:role/eksNodeRole, subnets subnet-0045d110dd02bb1 subnet-045d110dd02bb2, scaling minSize=1,maxSize=3,desiredSize=2.

How:
  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Revision, comparison and interview cards

Revise this lesson in a few minutes. Save the cards on your phone or download them as PNG files. The QR code on each card opens this lesson.

Revision card: What is Amazon EKS?. Big teams want one API (kubectl) to deploy and heal pods across clouds. That API is Kubernetes. Amazon EKS runs the managed Kubernetes control plane (API server, etcd, scheduler). You add worker nodes (EC2 or Fargate) where pods run. Create an EKS cluster, join a node group or Fargate profile, kubectl apply a Deployment. kubectl get nodes shows Ready workers; pods schedule onto them.
Revision card: What is Amazon EKS? · Download PNG · Open card page
Revision card: EKS cost warning. Students create EKS “to learn k8s” and leave the cluster up for days. EKS charges a flat hourly control-plane fee even with zero pods. Workers and load balancers add more. Delete lab clusters the same day. Prefer ECS Fargate for cheap Docker labs. An empty EKS cluster overnight still appears as EKS hours on the bill.
Revision card: EKS cost warning · Download PNG · Open card page
Revision card: When to choose EKS. LinkedIn buzz is not a design reason. Complexity needs a job or multi-cloud need. Choose EKS when you already use Helm/operators or need the Kubernetes API. Otherwise ECS is the simpler AWS-native default. Ask: do we need kubectl portability? If no, ship on ECS Fargate first. A single Docker API for a course project rarely needs EKS.
Revision card: When to choose EKS · Download PNG · Open card page
Comparison: Amazon ECS vs Amazon EKS. Amazon ECS: AWS tasks and services — no kubectl required. Amazon EKS: Full Kubernetes API (kubectl, Helm, operators).
Comparison: Amazon ECS vs Amazon EKS · Download PNG · Open card page
Interview card: What does EKS manage for you?. The Kubernetes control plane: API server, etcd, scheduler — multi-AZ by AWS. You still manage worker capacity, networking, and many add-on upgrades. Create EKS cluster; AWS runs control plane; you attach node groups or Fargate profiles.
Interview card: What does EKS manage for you? · Download PNG · Open card page
Interview card: EKS vs ECS — one-line answer?. EKS exposes the Kubernetes API; ECS uses AWS tasks/services without requiring kubectl. Pick ECS for simpler AWS-native containers; EKS when you need Helm/operators/multi-cloud k8s skills. Student Docker lab → ECS Fargate; platform team already on k8s → EKS.
Interview card: EKS vs ECS — one-line answer? · Download PNG · Open card page
Interview card: What is IRSA?. IAM Roles for Service Accounts — pods get IAM permissions without node instance keys. Avoids putting long-lived keys in pods and narrows blast radius per service account. Annotate a Kubernetes service account with an IAM role ARN trusted via OIDC.
Interview card: What is IRSA? · Download PNG · Open card page

More cards: Ravi Sir's Cards.