~/ nmadiraju.com Amazon EKS · StatefulSets
arrow_back Back to nmadiraju
Visual Walkthrough · Kubernetes workloads

How StatefulSets Work on Amazon EKS

Follow StatefulSet db, three Postgres Pods on EBS volumes, from first start to a rolling update, then check yourself with 8 questions.

1Visual Walkthrough

A StatefulSet's three Pods, one per Availability Zone, each with its own EBS volume Your VPC spans us-east-1a, 1b and 1c, each with one node, one db Pod and one EBS gp3 volume. The Kubernetes API holds StatefulSet db, the headless Service db, the PersistentVolumeClaims data-db-0 to data-db-2 and StorageClass ebs-gp3. The walkthrough shows a shared claim failing, claims per Pod, ordered creation, per-Pod DNS names, a Pod coming back with its volume, a zonal scheduling gotcha, scaling and a partitioned rolling update. You kubectl · laptop YOUR VPC us-east-1a us-east-1b us-east-1c DELETED DELETED DELETED EBS gp3 · 20 GiB vol-0c1f5e9a… EBS gp3 · 20 GiB vol-04b7d2e1… EBS gp3 · 20 GiB vol-09e3a6f8… KUBERNETES API Service db · headless clusterIP: None db-0.db.default.svc.cluster.local a DNS record for each Ready Pod PersistentVolumeClaims ReadWriteOnce · storageClassName: ebs-gp3 StorageClass ebs-gp3 parameters: type: gp3 volumeBindingMode: WaitForFirstConsumer one EBS volume per claim

    2Quiz to check understanding

    Check yourself