EKS Best Practices
Comprehensive guidance for designing, deploying, and operating Amazon EKS clusters. Consolidates guidance from the AWS EKS Best Practices Guide, AWS EKS HA/Resiliency Guide, and terraform-aws-modules/terraform-aws-eks examples.
When to Use This Skill
Activate this skill when:
- Designing a new EKS cluster architecture
- Choosing between EKS compute options (Fargate, MNG, Karpenter, Auto Mode)
- Configuring EKS networking (VPC CNI, ingress, service mesh)
- Implementing EKS security (IAM, pod security, secrets)
- Planning cluster upgrades or migrations
- Reviewing EKS architecture decisions
- Working with terraform-aws-modules/terraform-aws-eks examples
- Optimizing EKS cost or scaling to large clusters
Don't use this skill for:
- Generic Kubernetes concepts (Claude knows these)
- Provider-specific API reference (link to AWS docs)
- Non-EKS container orchestration (ECS, Lambda)
- Step-by-step EKS upgrade execution — this skill covers upgrade strategy and architectural decisions, not the per-version procedures themselves.
EKS Architecture Decision Framework
When to Use EKS
| Requirement |
EKS |
ECS |
Lambda |
| Kubernetes ecosystem |
✅ Native K8s |
❌ AWS-proprietary |
❌ |
| Portable across clouds |
✅ Standard K8s API |
❌ AWS-only |
❌ AWS-only |
| Long-running services |
✅ |
✅ |
⚠️ 15 min limit |
| Minimal ops overhead |
Medium |
Low |
Lowest |
| GPU/ML workloads |
✅ Best support |
Limited |
❌ |
| Complex networking |
✅ Full control |
Medium |
Limited |
| Team has K8s expertise |
Required |
Not required |
Not required |
EKS Deployment Models
| Model |
Description |
Operational Overhead |
Use When |
| EKS Standard |
Full control over nodes, add-ons, networking |
Medium-High |
Need full customization |
| EKS Auto Mode |
AWS manages nodes, add-ons, scaling |
Low |
Want minimal ops, standard workloads |
| EKS with Fargate |
Serverless pods, per-pod billing |
Low |
Batch, low-density workloads |
| EKS Hybrid Nodes |
Your on-prem/edge nodes on an AWS-managed control plane |
Medium-High |
Reliable Region link; AWS-managed control plane on your own hardware |
| EKS on Outposts |
EKS on AWS-owned hardware in your data center |
High |
Data residency or low latency; local clusters are disconnect-tolerant (not air-gapped) |
| EKS Anywhere |
You run the control plane and nodes on your own infrastructure |
Highest |
Air-gapped, isolated, or disconnected sites |
For choosing among and operating the on-premises/hybrid models, see: Hybrid & On-Premises Deployments.
Routing: the advisory question "which on-prem/hybrid model should I choose?" stays in this skill; generating a design document or diagram → eks-design; generating a full production cluster Terraform project or an air-gapped build → eks-build (the hybrid cloud/cluster-side Terraform example itself lives in this skill's terraform-examples.md).
Shared Responsibility
| Component |
AWS Manages |
You Manage |
| Control plane |
API server, etcd, HA, patching |
RBAC, admission control, audit logging |
| Data plane (MNG) |
AMI updates, node health |
Instance type, scaling, pod scheduling |
| Data plane (Fargate) |
Everything |
Pod spec, resource requests |
| Data plane (Auto Mode) |
Node lifecycle, OS patching |
Workload definitions |
| Networking |
ENI attachment, VPC CNI releases |
Subnet design, IP planning, ingress |
| Security |
Control plane auth |
IAM, pod security, secrets, network policies |
Compute Selection Matrix
Decision Table
| Factor |
Fargate |
MNG |
Karpenter |
Auto Mode |
Self-Managed |
| Best for |
Batch, small scale |
Stable, predictable |
Dynamic, varied |
Minimal ops |
Custom AMI/kernel |
| Scaling |
Per-pod |
ASG-based |
Fast, flexible |
AWS-managed |
Manual ASG |
| Spot support |
❌ |
✅ |
✅ Native |
✅ |
✅ |
| GPU support |
❌ |
✅ |
✅ |
✅ |
✅ |
| DaemonSets |
❌ |
✅ |
✅ |
✅ |
✅ |
| Cost model |
Per vCPU/GB/hr |
Per EC2 instance |
Per EC2 instance |
Per EC2 instance |
Per EC2 instance |
| Max pods/node |
1 |
ENI-based |
ENI-based |
AWS-managed |
ENI-based |
| Node SSH |
❌ |
✅ |
✅ |
❌ |
✅ |
| Operational |
Lowest |
Low |
Low |
Lowest |
Highest |
Quick Decision Guide
- Default choice: Karpenter — best balance of flexibility, cost, and automation
- Zero ops priority: EKS Auto Mode — AWS manages nodes, add-ons, and scaling via managed Karpenter. Best for teams that want Kubernetes benefits without operational overhead around upgrades, autoscaling, load balancing, and storage
- Serverless/batch: Fargate — no nodes to manage, per-pod billing
- Predictable, stable: MNG — familiar ASG model, managed updates
- Custom requirements: Self-managed — full control, highest overhead
✅ DO:
- Use Karpenter as the default node autoscaler for new clusters
- Run system components (CoreDNS, Karpenter) on MNG or Fargate
- Use multiple instance types for availability and cost optimization
❌ DON'T:
- Use self-managed nodes without a specific technical requirement
- Run Fargate for GPU or DaemonSet-dependent workloads
- Mix Karpenter and Cluster Autoscaler on the same node groups
Hybrid & On-Premises Deployments
Three models run EKS outside a standard in-Region cluster. Pick by who owns the control plane and whether the site stays connected:
| Model |
Control plane |
Reliable Region link? |
Choose when |
| EKS Hybrid Nodes |
AWS-managed, in-Region |
Required |
You want an AWS-managed control plane over your own on-prem/edge hardware |
| EKS Anywhere |
You run it on your infra |
Not required |
Air-gapped, isolated, or disconnected sites; you own the full stack |
| EKS on Outposts |
AWS-managed (in-Region for extended, on the Outpost for local) |
Required (extended) / tolerates disconnect (local, racks only) |
AWS-owned hardware for data residency or low latency |
Critical rule: split by why the site is disconnected. Permanently air-gapped/isolated → EKS Anywhere (the only fully air-gapped model). A connected site that must keep operating through Region outages on AWS-owned hardware (data residency/sovereignty) → Outposts local clusters (Outposts racks only) — disconnect-tolerant, not air-gapped (IAM/IRSA/KMS/EBS-PV/Route 53 are unavailable offline). EKS Hybrid Nodes and Outposts extended clusters both depend on a reliable connection to an AWS Region.
For detailed hybrid-deployment guidance, see: Hybrid & On-Premises Deployments
Networking Quick Reference
VPC CNI Mode Decision
| Mode |
Use When |
Pod Density |
| Secondary IP (default) |
Most workloads, simple setup |
Limited by ENI × IPs per ENI |
| Prefix Delegation |
>30 pods/node, IP-constrained VPC |
4-16× more pods per node |
| Custom Networking |
Pods need different CIDR than nodes |
Same as underlying mode |
Ingress Pattern Selection
| Pattern |
Best For |
Key Feature |
| ALB (via LBC) |
HTTP/HTTPS web apps |
Native WAF, Cognito auth |
| NLB (via LBC) |
TCP/UDP, gRPC, low latency |
Static IPs, source IP preservation |
| Gateway API |
Multi-team, new deployments |
✅ Recommended standard |
| VPC Lattice |
Cross-VPC service-to-service |
No sidecar, IAM auth |
IPv4 vs IPv6
| Factor |
IPv4 |
IPv6 |
| Default choice |
✅ Yes |
When facing IP exhaustion |
| AWS service support |
Full |
Most (check specific services) |
| Complexity |
Standard |
Requires dual-stack VPC |
For detailed networking guidance, see: Networking — VPC CNI & IP | Networking — Ingress & DNS
Security Essentials
IAM Strategy
| Approach |
Use When |
Setup |
| Pod Identity |
✅ New workloads |
EKS add-on + association |
| IRSA |
Older clusters, Fargate |
OIDC provider + trust policy |
Key rules:
- ✅ Use Pod Identity for new workloads — simpler setup, session tags, role chaining
- ✅ Use EKS access entries (API mode) over aws-auth ConfigMap
- ✅ Move VPC CNI permissions from node role to Pod Identity/IRSA
- ❌ Don't use wildcard conditions in IRSA trust policies
- ❌ Don't attach application permissions to node IAM roles
Pod Security Baseline
Apply Pod Security Admission (PSA) labels to all namespaces:
# Minimum: enforce baseline, warn on restricted
metadata:
labels:
pod-security.kubernetes.io/enforce: baseline
pod-security.kubernetes.io/warn: restricted
Secrets Management
| Approach |
Complexity |
Best For |
| External Secrets Operator |
Medium |
✅ GitOps workflows |
| Secrets Store CSI |
Medium |
Mount secrets as volumes |
| KMS envelope encryption |
Low |
Encrypt etcd secrets |
Envelope encryption is on by default (≥1.28) and covers all Kubernetes API data; layer your own KMS CMK when you need key control and CloudTrail visibility. Source: https://docs.aws.amazon.com/eks/latest/userguide/envelope-encryption.html
For detailed security guidance, see: Security Reference | Runtime & Network | Supply Chain & Compliance
Reliability Essentials
Pod Disruption Budgets
Create PDBs for every production workload with >1 replica:
| Workload |
Recommended PDB |
| Stateless (3+ replicas) |
minAvailable: "50%" |
| Stateful quorum (3) |
maxUnavailable: 1 |
| Batch/job |
maxUnavailable: "50%" |
| Singleton |
No PDB (would block all disruptions) |
Health Probe Strategy
| Probe |
Purpose |
Key Rule |
| Startup |
Wait for slow init |
Use for apps >10s startup |
| Readiness |
Traffic routing |
✅ Check dependencies here |
| Liveness |
Detect deadlocks |
❌ Never check dependencies |
Critical rule: Liveness probes must NOT check external dependencies. If the database goes down and liveness checks the DB, ALL pods restart — causing cascading failure.
Graceful Shutdown Pattern
spec:
terminationGracePeriodSeconds: 60
containers:
- lifecycle:
preStop:
exec:
command: ["/bin/sh", "-c", "sleep 15"]
Why sleep 15: Gives kube-proxy and load balancer time to remove the pod from traffic routing before SIGTERM.
Multi-AZ Distribution
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: DoNotSchedule
For detailed reliability guidance, see: Reliability & Resiliency — Core (see also reliability-advanced.md for DR, deployment strategies, and large-cluster guidance)
Cluster Upgrade Strategy
Upgrade Sequence (Strict Order)
1. Control Plane → 2. EKS Add-ons → 3. Data Plane → 4. Custom Add-ons
Pre-Upgrade Checklist
- Check EKS Cluster Insights for upgrade readiness
- Scan for deprecated APIs (Pluto, kube-no-trouble)
- Verify add-on compatibility with target version
- Test in non-prod environment first
- Ensure PDBs are configured for graceful node drain
- Back up cluster state (Velero or GitOps repo)
Upgrade Strategy Decision
| Factor |
In-Place |
Blue-Green |
| Risk |
Low-Medium |
Lowest |
| Cost |
No extra |
2× during migration |
| Rollback |
✅ To N-1 within 7 days of upgrade |
✅ Switch back (any window) |
| Use when |
✅ Most upgrades |
Post-7-day rollback, multi-minor jumps, data-plane isolation |
Native in-place rollback to N-1 is supported within 7 days of an in-place upgrade (all regions; Auto Mode rolls back nodes automatically; rollback into an extended-support version requires setting the cluster upgrade policy to EXTENDED first). update-cluster-version supports type VersionRollback, gated by a ROLLBACK_READINESS insight; add-ons/data-plane roll back separately. Blue-green retains independent rationale for post-7-day windows, multi-minor jumps, and data-plane isolation — not "because you can't roll back."
Data Plane with Karpenter
Karpenter automatically replaces nodes via drift detection after control plane upgrade. Control the speed with disruption.budgets:
disruption:
budgets:
- nodes: "10%" # Max 10% of nodes replaced at a time
For detailed upgrade guidance, see: Cluster Upgrades Reference
Autoscaling Quick Reference
Node Autoscaler Selection
|
Karpenter |
Cluster Autoscaler |
Auto Mode |
| Default choice |
✅ Yes |
Legacy/Outposts |
Minimal ops |
| Scale-up speed |
~30s |
~60-90s |
AWS-managed |
| Consolidation |
✅ Built-in |
❌ |
✅ |
| Customization |
High |
Medium |
Low |
Cluster Autoscaler's ~60-90s scale-up assumes cold EC2 launches; MNG EC2 warm pools (2026-04) pre-initialize instances and cut that latency substantially for MNG-backed node groups.
Pod Autoscaler Selection
| Scaler |
Trigger |
Use Case |
| HPA |
CPU, memory, custom |
Stateless services |
| VPA |
Historical usage |
Right-sizing (recommendation mode) |
| KEDA |
External events (SQS, Kafka) |
Event-driven workloads |
For detailed autoscaling guidance, see: Autoscaling Reference | Karpenter Reference
Preparing for a Known Traffic Peak
For a planned peak — a flash sale, marketing push, product launch, or seasonal event — the arrival is a near-instantaneous step at a known clock time, so favor scheduled pre-scaling (set floors ahead of the trigger) over relying on reactive autoscaling to catch up. Pre-warm all three layers (control plane, nodes, pods) and hold the floor across the whole event window rather than scaling down between peaks.
Critical rule: A load test that passes on request rate can still miss the failure that hits production — if it never reproduces the resource-consumption pattern (memory working-set, connection count) of the event's actual access patterns, especially for new features. Test consumption shapes, not just throughput, and act on findings before the event.
For detailed surge-readiness guidance, see: Surge Readiness Reference
Terraform Examples Quick Start
Based on terraform-aws-modules/terraform-aws-eks.
Example Selection
| Starting Point |
Recommended Example |
| General production |
karpenter (MNG for system + Karpenter for workloads) |
| Minimal ops |
eks-auto-mode |
| Managed nodes |
eks-managed-node-group (AL2023 or Bottlerocket) |
| Full node control |
self-managed-node-group |
| Platform capabilities |
eks-capabilities (ArgoCD, ACK, KRO) |
| Hybrid/edge |
eks-hybrid-nodes |
Common Deployment Topologies
Private cluster with Karpenter:
VPC (3 AZs, terraform-aws-modules/vpc/aws)
├── Private subnets → EKS nodes (MNG for system, Karpenter for workloads)
├── Public subnets → ALB (internet-facing)
├── Intra subnets → EKS control plane ENIs
└── NAT Gateway → 1 per AZ for production
Multi-tenant platform:
EKS Cluster (terraform-aws-modules/eks/aws)
├── kube-system (platform: CoreDNS, kube-proxy, VPC CNI)
├── karpenter (Karpenter controller on MNG)
├── monitoring (shared: Prometheus, Grafana)
├── ingress (shared: AWS LBC)
├── team-a namespace (RBAC, NetworkPolicy, ResourceQuota)
├── team-b namespace (RBAC, NetworkPolicy, ResourceQuota)
└── team-c namespace (RBAC, NetworkPolicy, ResourceQuota)
For detailed examples and terraform patterns, see: Terraform Examples Reference
Cost Optimization Quick Wins
| Action |
Savings |
Effort |
| Graviton (arm64) |
20-40% |
Low |
| Spot for non-critical |
60-90% |
Low |
| Karpenter consolidation |
20-30% |
Low |
| VPA right-sizing |
15-30% |
Medium |
| gp3 over gp2 |
20% on EBS |
Low |
| VPC endpoints |
Eliminate NAT costs |
Low |
For detailed cost guidance, see: Cost Optimization Reference | For scalability guidance, see: Scalability Reference
Observability Quick Reference
| Pillar |
AWS-Managed |
Open Source |
| Metrics |
Container Insights |
AMP + Grafana |
| Logs |
CloudWatch Logs |
OpenSearch, Loki |
| Traces |
X-Ray |
ADOT + Jaeger/Tempo |
Essential: Enable EKS audit logging and GuardDuty EKS Runtime Monitoring for security visibility.
For detailed observability guidance, see: Observability Reference
EKS Capabilities
EKS Capabilities are AWS-managed features installed and updated as part of the EKS platform. They run in AWS-owned infrastructure separate from your clusters, with AWS handling scaling, patching, and upgrading.
| Capability |
What It Does |
When to Use Managed |
When to Self-Manage |
| ArgoCD |
GitOps continuous delivery |
Multi-account hub-and-spoke, IAM IDC integration, minimal ops |
Custom plugins, air-gapped, existing ArgoCD investment |
| ACK |
Manage AWS resources via K8s CRDs (S3, RDS, IAM, etc.) |
Standard AWS resource management |
Specific controller version pinning, custom config |
| KRO |
Platform abstractions via ResourceGroupDefinitions |
Golden path templates, multi-resource compositions |
Early adoption risk concerns, custom reconciliation logic |
Combined pattern: ArgoCD deploys ACK resources + KRO compositions via GitOps, providing a single workflow for both infrastructure and applications.
For detailed ArgoCD patterns, see: ArgoCD Patterns Reference
Sources:
Detailed References
This skill uses progressive disclosure — essential guidance is in this main file, detailed reference material is loaded on demand:
- Security — IAM, Cluster Access Manager, Pod Identity, IRSA, pod security standards, multi-tenancy, secrets management, data encryption
- Security — Runtime & Network — Runtime threat detection (GuardDuty, seccomp, AppArmor, Falco), network policies, SG for pods, encryption in transit, detective controls
- Security — Supply Chain & Compliance — Image security (SBOMs, attestations, ECR hardening), infrastructure hardening (Bottlerocket, CIS benchmarks), regulatory compliance, incident response
- Networking — VPC CNI modes (secondary IP, prefix delegation, custom networking), subnet/CIDR planning, IPv4 vs IPv6, Security Groups for Pods, IP address management
- Networking — Ingress & DNS — Ingress patterns (ALB, NLB, Gateway API), AWS Load Balancer Controller, service mesh, DNS/CoreDNS tuning, private cluster connectivity
- Reliability & Resiliency — Core — HA patterns, PDBs, health probes, load balancer health checks, lifecycle hooks, topology spread, resource management
- Reliability & Resiliency — Advanced — disaster recovery, zonal shift, deployment strategies, large cluster guidance, chaos engineering, admission-controller topology enforcement
- Surge Readiness — preparing for a known traffic peak (flash sale, marketing push, product launch, seasonal event): spike shape vs magnitude, scheduled pre-scaling, capacity assurance (ODCR, quotas, LB warm-up), load-test realism, graceful degradation, and a descriptive pre-event readiness checklist
- Autoscaling — Autoscaler selection, Cluster Autoscaler (IAM, Spot, overprovisioning, parameter tuning), HPA, VPA, KEDA, CoreDNS autoscaling
- Karpenter — Operational best practices, NodePools, EC2NodeClass, Spot/interruption handling, consolidation, multiple NodePool strategy, cost controls, resource management, private clusters, CoreDNS with Karpenter
- Cluster Upgrades — In-place and blue-green upgrades, pre-upgrade validation, add-on management, API deprecation detection, version skew policy, Bottlerocket updates, rollback procedures
- Cost Optimization — CFM framework, compute/networking/storage cost strategies, observability cost management, Spot, Graviton, tagging, Kubecost
- Scalability — Scaling theory (churn rate, QPS), control plane (APF, config parameters, monitoring), data plane (node sizing, diversity), cluster services (CoreDNS, Metrics Server), workload patterns, IPVS, large-cluster guidance
- Observability — Observability strategy, CloudWatch Container Insights & Application Signals, Prometheus/Grafana, control plane monitoring, network performance monitoring, logging architecture, distributed tracing, GPU/AI-ML observability, detective controls, alerting patterns
- Terraform Examples — terraform-aws-modules/terraform-aws-eks examples, submodules, add-on management, Provisioned Control Plane, EFA, VPC patterns, deployment topologies
- ArgoCD Patterns — ArgoCD architecture, App of Apps, ApplicationSets, GitOps Bridge, multi-cluster patterns (hub-and-spoke, decentralized, hybrid), EKS ArgoCD Capability (managed vs self-managed, migration), ACK/KRO integration, multi-tenant RBAC
- Container Registry — ECR architecture, operating models, image promotion, vulnerability scanning, base image curation, lifecycle policies, pull-through cache, repository creation templates, managed signing (AWS Signer), archival storage class, registry configuration
- EKS Auto Mode — Auto Mode architecture, managed NodePools/NodeClasses, migration from standard EKS, comparison with self-managed Karpenter, limitations and FAQ
- Hybrid & On-Premises Deployments — EKS Hybrid Nodes, EKS Anywhere, and EKS on Outposts: model-selection decision boundary, per-model networking/CIDR/CNI, disconnection behavior, compute & autoscaling support, identity, lifecycle, and a cross-model support matrix
How to use: When you need detailed information on a topic, reference the appropriate guide. Claude will load it on demand.
Sources
1---2name: eks-best-practices3description: Advisory guidance for Amazon EKS architecture and configuration decisions — compute strategy, networking, security, reliability, cost, autoscaling, observability, multi-tenancy, upgrade planning, on-prem/hybrid (EKS Hybrid Nodes, EKS Anywhere, Outposts), and surge readiness for planned traffic peaks. Also answers Terraform questions about terraform-aws-modules/terraform-aws-eks. Use for any EKS planning or architectural judgment call, even when phrased casually. Do NOT use for generating documents or code (eks-design, eks-build), scoring or auditing a live cluster (eks-operation-review, eks-upgrade-check), discovering what is running (eks-recon), MCP tooling setup (eks-mcp-server), developer platforms/IDPs (eks-platform-engineering), GenAI/LLM workloads — GPU vs Trainium/Inferentia, vLLM/Ray serving, distributed training (eks-genai), or compliance hardening and audit prep — HIPAA/PCI/FedRAMP, CIS benchmarks, GuardDuty, image signing (eks-security) or an x86→arm64/Graviton migration (use graviton-migration).4---56# EKS Best Practices78Comprehensive guidance for designing, deploying, and operating Amazon EKS clusters. Consolidates guidance from the AWS EKS Best Practices Guide, AWS EKS HA/Resiliency Guide, and terraform-aws-modules/terraform-aws-eks examples.910## When to Use This Skill1112**Activate this skill when:**13- Designing a new EKS cluster architecture14- Choosing between EKS compute options (Fargate, MNG, Karpenter, Auto Mode)15- Configuring EKS networking (VPC CNI, ingress, service mesh)16- Implementing EKS security (IAM, pod security, secrets)17- Planning cluster upgrades or migrations18- Reviewing EKS architecture decisions19- Working with terraform-aws-modules/terraform-aws-eks examples20- Optimizing EKS cost or scaling to large clusters2122**Don't use this skill for:**23- Generic Kubernetes concepts (Claude knows these)24- Provider-specific API reference (link to AWS docs)25- Non-EKS container orchestration (ECS, Lambda)26- Step-by-step EKS upgrade execution — this skill covers upgrade strategy and architectural decisions, not the per-version procedures themselves.2728## EKS Architecture Decision Framework2930### When to Use EKS3132| Requirement | EKS | ECS | Lambda |33|-------------|-----|-----|--------|34| **Kubernetes ecosystem** | ✅ Native K8s | ❌ AWS-proprietary | ❌ |35| **Portable across clouds** | ✅ Standard K8s API | ❌ AWS-only | ❌ AWS-only |36| **Long-running services** | ✅ | ✅ | ⚠️ 15 min limit |37| **Minimal ops overhead** | Medium | Low | Lowest |38| **GPU/ML workloads** | ✅ Best support | Limited | ❌ |39| **Complex networking** | ✅ Full control | Medium | Limited |40| **Team has K8s expertise** | Required | Not required | Not required |4142### EKS Deployment Models4344| Model | Description | Operational Overhead | Use When |45|-------|-------------|---------------------|----------|46| **EKS Standard** | Full control over nodes, add-ons, networking | Medium-High | Need full customization |47| **EKS Auto Mode** | AWS manages nodes, add-ons, scaling | Low | Want minimal ops, standard workloads |48| **EKS with Fargate** | Serverless pods, per-pod billing | Low | Batch, low-density workloads |49| **EKS Hybrid Nodes** | Your on-prem/edge nodes on an AWS-managed control plane | Medium-High | Reliable Region link; AWS-managed control plane on your own hardware |50| **EKS on Outposts** | EKS on AWS-owned hardware in your data center | High | Data residency or low latency; local clusters are disconnect-tolerant (not air-gapped) |51| **EKS Anywhere** | You run the control plane and nodes on your own infrastructure | Highest | Air-gapped, isolated, or disconnected sites |5253**For choosing among and operating the on-premises/hybrid models, see:** [Hybrid & On-Premises Deployments](references/hybrid-deployments.md).5455**Routing:** the advisory question *"which on-prem/hybrid model should I choose?"* stays in this skill; generating a design **document or diagram** → `eks-design`; generating a **full production cluster Terraform project** or an **air-gapped build** → `eks-build` (the hybrid cloud/cluster-side Terraform *example* itself lives in this skill's [`terraform-examples.md`](references/terraform-examples.md)).5657### Shared Responsibility5859| Component | AWS Manages | You Manage |60|-----------|-------------|------------|61| **Control plane** | API server, etcd, HA, patching | RBAC, admission control, audit logging |62| **Data plane (MNG)** | AMI updates, node health | Instance type, scaling, pod scheduling |63| **Data plane (Fargate)** | Everything | Pod spec, resource requests |64| **Data plane (Auto Mode)** | Node lifecycle, OS patching | Workload definitions |65| **Networking** | ENI attachment, VPC CNI releases | Subnet design, IP planning, ingress |66| **Security** | Control plane auth | IAM, pod security, secrets, network policies |6768## Compute Selection Matrix6970### Decision Table7172| Factor | Fargate | MNG | Karpenter | Auto Mode | Self-Managed |73|--------|---------|-----|-----------|-----------|-------------|74| **Best for** | Batch, small scale | Stable, predictable | Dynamic, varied | Minimal ops | Custom AMI/kernel |75| **Scaling** | Per-pod | ASG-based | Fast, flexible | AWS-managed | Manual ASG |76| **Spot support** | ❌ | ✅ | ✅ Native | ✅ | ✅ |77| **GPU support** | ❌ | ✅ | ✅ | ✅ | ✅ |78| **DaemonSets** | ❌ | ✅ | ✅ | ✅ | ✅ |79| **Cost model** | Per vCPU/GB/hr | Per EC2 instance | Per EC2 instance | Per EC2 instance | Per EC2 instance |80| **Max pods/node** | 1 | ENI-based | ENI-based | AWS-managed | ENI-based |81| **Node SSH** | ❌ | ✅ | ✅ | ❌ | ✅ |82| **Operational** | Lowest | Low | Low | Lowest | Highest |8384### Quick Decision Guide8586- **Default choice:** Karpenter — best balance of flexibility, cost, and automation87- **Zero ops priority:** EKS Auto Mode — AWS manages nodes, add-ons, and scaling via managed Karpenter. Best for teams that want Kubernetes benefits without operational overhead around upgrades, autoscaling, load balancing, and storage88- **Serverless/batch:** Fargate — no nodes to manage, per-pod billing89- **Predictable, stable:** MNG — familiar ASG model, managed updates90- **Custom requirements:** Self-managed — full control, highest overhead9192✅ DO:93- Use Karpenter as the default node autoscaler for new clusters94- Run system components (CoreDNS, Karpenter) on MNG or Fargate95- Use multiple instance types for availability and cost optimization9697❌ DON'T:98- Use self-managed nodes without a specific technical requirement99- Run Fargate for GPU or DaemonSet-dependent workloads100- Mix Karpenter and Cluster Autoscaler on the same node groups101102## Hybrid & On-Premises Deployments103104Three models run EKS outside a standard in-Region cluster. Pick by who owns the control plane and whether the site stays connected:105106| Model | Control plane | Reliable Region link? | Choose when |107|-------|---------------|----------------------|-------------|108| **EKS Hybrid Nodes** | AWS-managed, in-Region | Required | You want an AWS-managed control plane over your own on-prem/edge hardware |109| **EKS Anywhere** | You run it on your infra | Not required | Air-gapped, isolated, or disconnected sites; you own the full stack |110| **EKS on Outposts** | AWS-managed (in-Region for extended, on the Outpost for local) | Required (extended) / tolerates disconnect (local, racks only) | AWS-owned hardware for data residency or low latency |111112**Critical rule:** split by *why* the site is disconnected. Permanently air-gapped/isolated → EKS Anywhere (the only fully air-gapped model). A connected site that must keep operating *through* Region outages on AWS-owned hardware (data residency/sovereignty) → Outposts local clusters (Outposts racks only) — disconnect-*tolerant*, not air-gapped (IAM/IRSA/KMS/EBS-PV/Route 53 are unavailable offline). EKS Hybrid Nodes and Outposts extended clusters both depend on a reliable connection to an AWS Region.113114**For detailed hybrid-deployment guidance, see:** [Hybrid & On-Premises Deployments](references/hybrid-deployments.md)115116## Networking Quick Reference117118### VPC CNI Mode Decision119120| Mode | Use When | Pod Density |121|------|----------|-------------|122| **Secondary IP** (default) | Most workloads, simple setup | Limited by ENI × IPs per ENI |123| **Prefix Delegation** | >30 pods/node, IP-constrained VPC | 4-16× more pods per node |124| **Custom Networking** | Pods need different CIDR than nodes | Same as underlying mode |125126### Ingress Pattern Selection127128| Pattern | Best For | Key Feature |129|---------|----------|-------------|130| **ALB (via LBC)** | HTTP/HTTPS web apps | Native WAF, Cognito auth |131| **NLB (via LBC)** | TCP/UDP, gRPC, low latency | Static IPs, source IP preservation |132| **Gateway API** | Multi-team, new deployments | ✅ Recommended standard |133| **VPC Lattice** | Cross-VPC service-to-service | No sidecar, IAM auth |134135### IPv4 vs IPv6136137| Factor | IPv4 | IPv6 |138|--------|------|------|139| **Default choice** | ✅ Yes | When facing IP exhaustion |140| **AWS service support** | Full | Most (check specific services) |141| **Complexity** | Standard | Requires dual-stack VPC |142143**For detailed networking guidance, see:** [Networking — VPC CNI & IP](references/networking.md) | [Networking — Ingress & DNS](references/networking-ingress-dns.md)144145## Security Essentials146147### IAM Strategy148149| Approach | Use When | Setup |150|----------|----------|-------|151| **Pod Identity** | ✅ New workloads | EKS add-on + association |152| **IRSA** | Older clusters, Fargate | OIDC provider + trust policy |153154**Key rules:**155- ✅ Use Pod Identity for new workloads — simpler setup, session tags, role chaining156- ✅ Use EKS access entries (API mode) over aws-auth ConfigMap157- ✅ Move VPC CNI permissions from node role to Pod Identity/IRSA158- ❌ Don't use wildcard conditions in IRSA trust policies159- ❌ Don't attach application permissions to node IAM roles160161### Pod Security Baseline162163Apply Pod Security Admission (PSA) labels to all namespaces:164165```yaml166# Minimum: enforce baseline, warn on restricted167metadata:168 labels:169 pod-security.kubernetes.io/enforce: baseline170 pod-security.kubernetes.io/warn: restricted171```172173### Secrets Management174175| Approach | Complexity | Best For |176|----------|-----------|----------|177| **External Secrets Operator** | Medium | ✅ GitOps workflows |178| **Secrets Store CSI** | Medium | Mount secrets as volumes |179| **KMS envelope encryption** | Low | Encrypt etcd secrets |180181Envelope encryption is on by default (≥1.28) and covers all Kubernetes API data; layer your own KMS CMK when you need key control and CloudTrail visibility. Source: https://docs.aws.amazon.com/eks/latest/userguide/envelope-encryption.html182183**For detailed security guidance, see:** [Security Reference](references/security.md) | [Runtime & Network](references/security-runtime-network.md) | [Supply Chain & Compliance](references/security-supply-chain.md)184185## Reliability Essentials186187### Pod Disruption Budgets188189**Create PDBs for every production workload with >1 replica:**190191| Workload | Recommended PDB |192|----------|----------------|193| **Stateless (3+ replicas)** | `minAvailable: "50%"` |194| **Stateful quorum (3)** | `maxUnavailable: 1` |195| **Batch/job** | `maxUnavailable: "50%"` |196| **Singleton** | No PDB (would block all disruptions) |197198### Health Probe Strategy199200| Probe | Purpose | Key Rule |201|-------|---------|----------|202| **Startup** | Wait for slow init | Use for apps >10s startup |203| **Readiness** | Traffic routing | ✅ Check dependencies here |204| **Liveness** | Detect deadlocks | ❌ Never check dependencies |205206**Critical rule:** Liveness probes must NOT check external dependencies. If the database goes down and liveness checks the DB, ALL pods restart — causing cascading failure.207208### Graceful Shutdown Pattern209210```yaml211spec:212 terminationGracePeriodSeconds: 60213 containers:214 - lifecycle:215 preStop:216 exec:217 command: ["/bin/sh", "-c", "sleep 15"]218```219220**Why `sleep 15`:** Gives kube-proxy and load balancer time to remove the pod from traffic routing before SIGTERM.221222### Multi-AZ Distribution223224```yaml225topologySpreadConstraints:226- maxSkew: 1227 topologyKey: topology.kubernetes.io/zone228 whenUnsatisfiable: DoNotSchedule229```230231**For detailed reliability guidance, see:** [Reliability & Resiliency — Core](references/reliability-core.md) (see also [reliability-advanced.md](references/reliability-advanced.md) for DR, deployment strategies, and large-cluster guidance)232233## Cluster Upgrade Strategy234235### Upgrade Sequence (Strict Order)236237```2381. Control Plane → 2. EKS Add-ons → 3. Data Plane → 4. Custom Add-ons239```240241### Pre-Upgrade Checklist2422431. Check EKS Cluster Insights for upgrade readiness2442. Scan for deprecated APIs (Pluto, kube-no-trouble)2453. Verify add-on compatibility with target version2464. Test in non-prod environment first2475. Ensure PDBs are configured for graceful node drain2486. Back up cluster state (Velero or GitOps repo)249250### Upgrade Strategy Decision251252| Factor | In-Place | Blue-Green |253|--------|---------|------------|254| **Risk** | Low-Medium | Lowest |255| **Cost** | No extra | 2× during migration |256| **Rollback** | ✅ To N-1 within 7 days of upgrade | ✅ Switch back (any window) |257| **Use when** | ✅ Most upgrades | Post-7-day rollback, multi-minor jumps, data-plane isolation |258259Native in-place rollback to N-1 is supported within **7 days** of an in-place upgrade (all regions; Auto Mode rolls back nodes automatically; rollback into an extended-support version requires setting the cluster upgrade policy to `EXTENDED` first). `update-cluster-version` supports type `VersionRollback`, gated by a `ROLLBACK_READINESS` insight; add-ons/data-plane roll back separately. Blue-green retains independent rationale for post-7-day windows, multi-minor jumps, and data-plane isolation — not "because you can't roll back."260261### Data Plane with Karpenter262263Karpenter automatically replaces nodes via drift detection after control plane upgrade. Control the speed with `disruption.budgets`:264265```yaml266disruption:267 budgets:268 - nodes: "10%" # Max 10% of nodes replaced at a time269```270271**For detailed upgrade guidance, see:** [Cluster Upgrades Reference](references/cluster-upgrades.md)272273## Autoscaling Quick Reference274275### Node Autoscaler Selection276277| | Karpenter | Cluster Autoscaler | Auto Mode |278|--|-----------|-------------------|-----------|279| **Default choice** | ✅ Yes | Legacy/Outposts | Minimal ops |280| **Scale-up speed** | ~30s | ~60-90s | AWS-managed |281| **Consolidation** | ✅ Built-in | ❌ | ✅ |282| **Customization** | High | Medium | Low |283284Cluster Autoscaler's ~60-90s scale-up assumes cold EC2 launches; MNG EC2 warm pools (2026-04) pre-initialize instances and cut that latency substantially for MNG-backed node groups.285286### Pod Autoscaler Selection287288| Scaler | Trigger | Use Case |289|--------|---------|----------|290| **HPA** | CPU, memory, custom | Stateless services |291| **VPA** | Historical usage | Right-sizing (recommendation mode) |292| **KEDA** | External events (SQS, Kafka) | Event-driven workloads |293294**For detailed autoscaling guidance, see:** [Autoscaling Reference](references/autoscaling.md) | [Karpenter Reference](references/karpenter.md)295296### Preparing for a Known Traffic Peak297298For a planned peak — a flash sale, marketing push, product launch, or seasonal event — the arrival is a near-instantaneous step at a known clock time, so favor **scheduled pre-scaling** (set floors ahead of the trigger) over relying on reactive autoscaling to catch up. Pre-warm all three layers (control plane, nodes, pods) and hold the floor across the whole event window rather than scaling down between peaks.299300**Critical rule:** A load test that passes on request *rate* can still miss the failure that hits production — if it never reproduces the resource-consumption pattern (memory working-set, connection count) of the event's actual access patterns, especially for new features. Test consumption shapes, not just throughput, and act on findings before the event.301302**For detailed surge-readiness guidance, see:** [Surge Readiness Reference](references/surge-readiness.md)303304## Terraform Examples Quick Start305306Based on [terraform-aws-modules/terraform-aws-eks](https://github.com/terraform-aws-modules/terraform-aws-eks).307308### Example Selection309310| Starting Point | Recommended Example |311|---------------|-------------------|312| **General production** | `karpenter` (MNG for system + Karpenter for workloads) |313| **Minimal ops** | `eks-auto-mode` |314| **Managed nodes** | `eks-managed-node-group` (AL2023 or Bottlerocket) |315| **Full node control** | `self-managed-node-group` |316| **Platform capabilities** | `eks-capabilities` (ArgoCD, ACK, KRO) |317| **Hybrid/edge** | `eks-hybrid-nodes` |318319### Common Deployment Topologies320321**Private cluster with Karpenter:**322```323VPC (3 AZs, terraform-aws-modules/vpc/aws)324├── Private subnets → EKS nodes (MNG for system, Karpenter for workloads)325├── Public subnets → ALB (internet-facing)326├── Intra subnets → EKS control plane ENIs327└── NAT Gateway → 1 per AZ for production328```329330**Multi-tenant platform:**331```332EKS Cluster (terraform-aws-modules/eks/aws)333├── kube-system (platform: CoreDNS, kube-proxy, VPC CNI)334├── karpenter (Karpenter controller on MNG)335├── monitoring (shared: Prometheus, Grafana)336├── ingress (shared: AWS LBC)337├── team-a namespace (RBAC, NetworkPolicy, ResourceQuota)338├── team-b namespace (RBAC, NetworkPolicy, ResourceQuota)339└── team-c namespace (RBAC, NetworkPolicy, ResourceQuota)340```341342**For detailed examples and terraform patterns, see:** [Terraform Examples Reference](references/terraform-examples.md)343344## Cost Optimization Quick Wins345346| Action | Savings | Effort |347|--------|---------|--------|348| **Graviton (arm64)** | 20-40% | Low |349| **Spot for non-critical** | 60-90% | Low |350| **Karpenter consolidation** | 20-30% | Low |351| **VPA right-sizing** | 15-30% | Medium |352| **gp3 over gp2** | 20% on EBS | Low |353| **VPC endpoints** | Eliminate NAT costs | Low |354355**For detailed cost guidance, see:** [Cost Optimization Reference](references/cost-optimization.md) | **For scalability guidance, see:** [Scalability Reference](references/scalability.md)356357## Observability Quick Reference358359| Pillar | AWS-Managed | Open Source |360|--------|-------------|-------------|361| **Metrics** | Container Insights | AMP + Grafana |362| **Logs** | CloudWatch Logs | OpenSearch, Loki |363| **Traces** | X-Ray | ADOT + Jaeger/Tempo |364365**Essential:** Enable EKS audit logging and GuardDuty EKS Runtime Monitoring for security visibility.366367**For detailed observability guidance, see:** [Observability Reference](references/observability.md)368369## EKS Capabilities370371EKS Capabilities are AWS-managed features installed and updated as part of the EKS platform. They run in AWS-owned infrastructure separate from your clusters, with AWS handling scaling, patching, and upgrading.372373| Capability | What It Does | When to Use Managed | When to Self-Manage |374|-----------|-------------|--------------------|--------------------|375| **ArgoCD** | GitOps continuous delivery | Multi-account hub-and-spoke, IAM IDC integration, minimal ops | Custom plugins, air-gapped, existing ArgoCD investment |376| **ACK** | Manage AWS resources via K8s CRDs (S3, RDS, IAM, etc.) | Standard AWS resource management | Specific controller version pinning, custom config |377| **KRO** | Platform abstractions via ResourceGroupDefinitions | Golden path templates, multi-resource compositions | Early adoption risk concerns, custom reconciliation logic |378379**Combined pattern:** ArgoCD deploys ACK resources + KRO compositions via GitOps, providing a single workflow for both infrastructure and applications.380381**For detailed ArgoCD patterns, see:** [ArgoCD Patterns Reference](references/argocd-patterns.md)382383**Sources:**384- [EKS Capabilities Documentation](https://docs.aws.amazon.com/eks/latest/userguide/capabilities.html)385- [AWS Blog — Deep dive: Simplifying resource orchestration with Amazon EKS Capabilities](https://aws.amazon.com/blogs/containers/deep-dive-simplifying-resource-orchestration-with-amazon-eks-capabilities/)386387## Detailed References388389This skill uses **progressive disclosure** — essential guidance is in this main file, detailed reference material is loaded on demand:390391- **[Security](references/security.md)** — IAM, Cluster Access Manager, Pod Identity, IRSA, pod security standards, multi-tenancy, secrets management, data encryption392- **[Security — Runtime & Network](references/security-runtime-network.md)** — Runtime threat detection (GuardDuty, seccomp, AppArmor, Falco), network policies, SG for pods, encryption in transit, detective controls393- **[Security — Supply Chain & Compliance](references/security-supply-chain.md)** — Image security (SBOMs, attestations, ECR hardening), infrastructure hardening (Bottlerocket, CIS benchmarks), regulatory compliance, incident response394- **[Networking](references/networking.md)** — VPC CNI modes (secondary IP, prefix delegation, custom networking), subnet/CIDR planning, IPv4 vs IPv6, Security Groups for Pods, IP address management395- **[Networking — Ingress & DNS](references/networking-ingress-dns.md)** — Ingress patterns (ALB, NLB, Gateway API), AWS Load Balancer Controller, service mesh, DNS/CoreDNS tuning, private cluster connectivity396- **[Reliability & Resiliency — Core](references/reliability-core.md)** — HA patterns, PDBs, health probes, load balancer health checks, lifecycle hooks, topology spread, resource management397- **[Reliability & Resiliency — Advanced](references/reliability-advanced.md)** — disaster recovery, zonal shift, deployment strategies, large cluster guidance, chaos engineering, admission-controller topology enforcement398- **[Surge Readiness](references/surge-readiness.md)** — preparing for a known traffic peak (flash sale, marketing push, product launch, seasonal event): spike shape vs magnitude, scheduled pre-scaling, capacity assurance (ODCR, quotas, LB warm-up), load-test realism, graceful degradation, and a descriptive pre-event readiness checklist399- **[Autoscaling](references/autoscaling.md)** — Autoscaler selection, Cluster Autoscaler (IAM, Spot, overprovisioning, parameter tuning), HPA, VPA, KEDA, CoreDNS autoscaling400- **[Karpenter](references/karpenter.md)** — Operational best practices, NodePools, EC2NodeClass, Spot/interruption handling, consolidation, multiple NodePool strategy, cost controls, resource management, private clusters, CoreDNS with Karpenter401- **[Cluster Upgrades](references/cluster-upgrades.md)** — In-place and blue-green upgrades, pre-upgrade validation, add-on management, API deprecation detection, version skew policy, Bottlerocket updates, rollback procedures402- **[Cost Optimization](references/cost-optimization.md)** — CFM framework, compute/networking/storage cost strategies, observability cost management, Spot, Graviton, tagging, Kubecost403- **[Scalability](references/scalability.md)** — Scaling theory (churn rate, QPS), control plane (APF, config parameters, monitoring), data plane (node sizing, diversity), cluster services (CoreDNS, Metrics Server), workload patterns, IPVS, large-cluster guidance404- **[Observability](references/observability.md)** — Observability strategy, CloudWatch Container Insights & Application Signals, Prometheus/Grafana, control plane monitoring, network performance monitoring, logging architecture, distributed tracing, GPU/AI-ML observability, detective controls, alerting patterns405- **[Terraform Examples](references/terraform-examples.md)** — terraform-aws-modules/terraform-aws-eks examples, submodules, add-on management, Provisioned Control Plane, EFA, VPC patterns, deployment topologies406- **[ArgoCD Patterns](references/argocd-patterns.md)** — ArgoCD architecture, App of Apps, ApplicationSets, GitOps Bridge, multi-cluster patterns (hub-and-spoke, decentralized, hybrid), EKS ArgoCD Capability (managed vs self-managed, migration), ACK/KRO integration, multi-tenant RBAC407- **[Container Registry](references/container-registry.md)** — ECR architecture, operating models, image promotion, vulnerability scanning, base image curation, lifecycle policies, pull-through cache, repository creation templates, managed signing (AWS Signer), archival storage class, registry configuration408- **[EKS Auto Mode](references/eks-auto-mode.md)** — Auto Mode architecture, managed NodePools/NodeClasses, migration from standard EKS, comparison with self-managed Karpenter, limitations and FAQ409- **[Hybrid & On-Premises Deployments](references/hybrid-deployments.md)** — EKS Hybrid Nodes, EKS Anywhere, and EKS on Outposts: model-selection decision boundary, per-model networking/CIDR/CNI, disconnection behavior, compute & autoscaling support, identity, lifecycle, and a cross-model support matrix410411**How to use:** When you need detailed information on a topic, reference the appropriate guide. Claude will load it on demand.412413## Sources414415- [AWS EKS Best Practices Guide](https://docs.aws.amazon.com/eks/latest/best-practices/)416- [terraform-aws-modules/terraform-aws-eks](https://github.com/terraform-aws-modules/terraform-aws-eks)