Sub topic 1
Kubernetes on AWS with Amazon EKS
Prerequisites
Assume you know Kubernetes pods, Deployments, Services, namespaces, and basic YAML. You should also be comfortable with kubectl, AWS IAM, VPCs, EC2, and the AWS CLI.
Kubernetes Building Blocks You Will Reuse on EKS
A Pod is the smallest Kubernetes unit that runs containers. A Deployment keeps the requested number of pod replicas running and replaces failed pods. A Service gives pods a stable name and virtual IP, even when pods are recreated.
These objects remain standard Kubernetes resources on EKS. EKS supplies the AWS infrastructure around them.
How EKS Is Put Together
Amazon EKS runs the Kubernetes control plane, which stores cluster state and schedules pods. AWS manages its availability, patching, and control-plane hosts. You manage the data plane, which is the compute capacity where pods run.
The data plane can use EC2 nodes, AWS Fargate, or self-managed nodes. The control plane communicates with nodes through the cluster network.
Pod Networking in a VPC
EKS commonly uses the Amazon VPC CNI, a networking plug-in that assigns VPC IP addresses directly to pods. This lets pods communicate with VPC resources, but it consumes subnet IP capacity. Plan subnet sizes before creating a busy cluster.
Security groups protect node and load-balancer network interfaces. Kubernetes Services and network policies provide additional traffic controls.
Creating Your First Cluster
eksctl is a command-line tool that creates EKS resources from a declarative configuration file.
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: demo
region: us-east-1
managedNodeGroups:
- name: ng-1
instanceType: m5.large
desiredCapacity: 2
minSize: 1
maxSize: 4eksctl create cluster -f cluster.yaml
aws eks update-kubeconfig --name demo --region us-east-1
kubectl get nodesChoosing Where Pods Run
Managed node groups are the usual default because AWS handles node provisioning and lifecycle operations. Fargate removes node management for supported pod workloads, but has different pricing and feature limits. Self-managed nodes provide maximum control and maximum operational responsibility.
Exercise
Which EKS component should you inspect first when a pod cannot be scheduled?
Show answer
Inspect the data plane: available node capacity, node labels, taints, and pod scheduling requirements.