~/ nmadiraju.com Amazon EKS · Taints, tolerations and affinity
arrow_back Back to nmadiraju
Visual Walkthrough · Kubernetes scheduling

How Taints, Tolerations and Affinity Work on Amazon EKS

Follow the GPU training Pod train and web's three replicas onto the right nodes, then check yourself with 8 questions.

1Visual Walkthrough

Pods placed on EKS nodes by taints, tolerations, node affinity and topology spread constraints The Kubernetes API holds Pod train, Deployment web and the latest scheduler or node controller event. Your VPC has two zones: us-east-1a with node-1 (m6i.large) and gpu-1 (g5.xlarge, A10G), us-east-1b with node-2 (m6i.large) and gpu-2 (g4dn.xlarge, T4). The walkthrough shows web Pods on GPU nodes, a NoSchedule taint, the toleration EKS adds for GPU requests, train failing on the wrong GPU, required node affinity, Pending with no match, NoExecute eviction with tolerationSeconds, and spreading web across zones. You kubectl · aws eks KUBERNETES API · CLUSTER prod Pod train · Job ml-train limits nvidia.com/gpu: 1 Deployment web replicas: 3 · cpu 250m no tolerations Latest event kube-scheduler · kube-controller-manager YOUR VPC us-east-1a us-east-1b node-1 m6i.large · ng-general 2 vCPU · 8 GiB gpu-1 · A10G 24 GB g5.xlarge · ng-gpu-a10g label gpu-model=a10g node-2 m6i.large · ng-general 2 vCPU · 8 GiB gpu-2 · T4 16 GB g4dn.xlarge · ng-gpu-t4 label gpu-model=t4 web Pod Running · cpu 250m web Pod Running · cpu 250m web Pod Running · cpu 250m web Pod Running · cpu 250m web Pod Running · cpu 250m web Pod Running · cpu 250m web Pod Running · cpu 250m train train finetune Running · holds the GPU

    2Quiz to check understanding

    Check yourself