AWS - EKS - Elastic Kubernetes Service#

EKS (Elastic Kubernetes Service) is AWS’ managed Kubernetes offering. If you’ve been through my Kubernetes notes with Minikube, this is the production version of the same thing: the control plane (API server, etcd, scheduler) is run and patched by AWS, and you manage the worker nodes (or let Fargate run pods without nodes at all).

You already know why we might want ECS instead: it trades flexibility for simplicity. But if you want the full Kubernetes API - Deployment, Service, Ingress, Helm, operators, and everything else - EKS is how you get it without babysitting etcd.

In this section we take the PatientPing app from the earlier lessons and run it on EKS:

  1. We create a cluster in our VPC.
  2. We compare it with my own kubeadm cluster - what AWS takes, what stays the same.
  3. We deploy patientping-web to it.
  4. We let the pods talk to S3 (for the favicon and other files).
  5. We let the pods talk to our RDS Postgres database.
  6. We look at scheduling on managed node groups: taints and node affinity.
  7. We make the whole thing survive losing a node - EKS-style HA.
  8. We run the stateless app on interruptible, ~90% cheaper spot capacity.

Architecture#

flowchart TB
    subgraph vpc [VPC 10.0.0.0/22]
        subgraph pub [public subnets]
            alb[Load Balancer]
        end
        subgraph priv [private subnets]
            subgraph eks [EKS cluster]
                pod1[patientping-web pod]
                pod2[patientping-web pod]
            end
            rds[(patientping-db RDS)]
        end
    end
    s3[(S3 bucket)]
    internet((internet)) --> alb --> pod1 & pod2
    pod1 & pod2 --> rds
    pod1 & pod2 --> s3

Not: EKS cluster’ı VPC’mizin private subnet’lerinde durur, dışarıdan trafik Load Balancer üzerinden gelir. RDS zaten private subnet’te - pod’larla aynı VPC içinde oldukları için yerel rota üzerinden konuşurlar.

Cost check: EKS isn’t free-tier friendly. The control plane alone costs about $0.10 per hour (~$73/month) whether or not you run any pods, plus the EC2 instances (or Fargate vCPUs) for your worker nodes. Delete the cluster when you’re done with this section.