skills/cloud/aws/eks-kubernetes/SKILL.md
Use when designing EKS clusters, choosing node types (managed/Fargate), implementing IRSA for pod IAM access, scaling with Karpenter, or troubleshooting EKS networking. Covers AWS DOP-C02 and SAP-C02 container orchestration domains.
npx skillsauth add kienbui1995/magic-powers eks-kubernetesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Node Type | Management | OS Patching | Best For | |-----------|-----------|------------|---------| | Managed node groups | AWS manages ASG and node lifecycle | AWS patches AMIs; you trigger update | Default choice; rolling updates with node draining | | Self-managed nodes | You manage EC2, ASG, bootstrap | You patch everything | Custom AMIs, specialized hardware, specific bootstrap requirements | | Fargate profiles | Serverless; no nodes to manage | AWS manages everything | Event-driven, batch, dev/test, burst workloads |
Fargate limitations:
Mixed approach: Managed nodes for stable workloads + Fargate for burst/batch jobs.
Why IRSA:
Setup:
{
"Principal": {
"Federated": "arn:aws:iam::ACCOUNT:oidc-provider/oidc.eks.REGION.amazonaws.com/id/CLUSTER_ID"
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"oidc.eks.REGION.amazonaws.com/id/CLUSTER_ID:sub": "system:serviceaccount:NAMESPACE:SA_NAME"
}
}
}
apiVersion: v1
kind: ServiceAccount
metadata:
name: my-sa
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::ACCOUNT:role/my-pod-role
AWS SDK auto-picks up IRSA credentials via web identity token file mounted at pod startup.
| Feature | Cluster Autoscaler (CA) | Karpenter | |---------|------------------------|---------| | Mechanism | Scale ASG up/down | Directly provision EC2 instances | | Speed | Slower (ASG delays, ~2–5 min) | Faster (~30s from unschedulable to running) | | Node diversity | Limited to defined ASG node types | Any EC2 instance type (best-fit) | | Spot interruption | Manual handling | Built-in Spot rebalancing | | Configuration | Complex (one ASG per node type) | NodePool/NodeClass declarative config | | Cost optimization | Limited | Bin-packing + Spot + Savings Plans |
Karpenter provisioning flow:
NodePool example (Karpenter):
apiVersion: karpenter.sh/v1beta1
kind: NodePool
spec:
template:
spec:
requirements:
- key: "karpenter.sh/capacity-type"
operator: In
values: ["spot", "on-demand"]
- key: "node.kubernetes.io/instance-type"
operator: In
values: ["m5.xlarge", "m5.2xlarge", "m6i.xlarge"]
disruption:
consolidationPolicy: WhenUnderutilized
fargate_profiles:
- name: batch-jobs
selectors:
- namespace: batch
labels:
workload-type: batch
- name: system
selectors:
- namespace: kube-system
CoreDNS on Fargate: requires Fargate profile for kube-system namespace; apply annotation patch to remove eks.amazonaws.com/compute-type: ec2 annotation.
Subnet planning for EKS:
| Add-on | Purpose | Notes | |--------|---------|-------| | Amazon VPC CNI | Pod networking with VPC IPs | Required; managed by AWS | | CoreDNS | Cluster DNS | Required; runs as Deployment | | kube-proxy | Service networking (iptables/ipvs) | Required per node | | EBS CSI Driver | EBS persistent volumes for pods | Required for StatefulSets with EBS | | EFS CSI Driver | EFS shared storage for pods | For shared persistent storage | | AWS Load Balancer Controller | ALB/NLB creation from K8s Ingress/Service | Replaces ALB Ingress Controller |
Managed add-ons: AWS handles updates; version controlled via EKS console/CLI; integration with EKS cluster version lifecycle.
content-media
Use when designing for XR (AR/VR/MR), choosing interaction modes, or adapting 2D UI patterns for spatial computing
testing
Use when creating new skills, editing existing skills, or verifying skills work before deployment
development
Use when you have a spec or requirements for a multi-step task, before touching code
development
Use when executing a structured workflow — select and run a feature, bugfix, refactor, research, or incident template with correct agent and model assignments per phase.