Amazon EKS · Lesson 7 of 11 · 3 min read
Security hardening
A checklist for a production EKS cluster:
- Private API endpoint (or public with tight CIDRs); kubectl via SSO roles through access entries; no long-lived kubeconfigs with static credentials.
- Least-privilege RBAC via access entries and namespace-scoped policies; break-glass admin role audited.
- Pod IAM with IRSA/Pod Identity; block pod access to the node's instance metadata (IMDSv2 required with hop limit 1 on nodes, or NetworkPolicy blocking 169.254.169.254) so pods can't steal the node role's credentials.
- Pod Security Admission
restrictedfor app namespaces; Gatekeeper/Kyverno policies (allowed registries, no privileged pods, limits required). - NetworkPolicies with default deny; security groups for pods for database access.
- Image security: ECR with scan on push/Inspector, immutable tags, signed images verified at admission.
- Secrets encrypted with KMS; sourced from Secrets Manager; no secrets in Git or env vars where avoidable.
- Node hardening: minimal AMIs (Bottlerocket/AL2023), regular replacement (Karpenter
expireAfter, drift), SSM instead of SSH, no public IPs on nodes. - Detection: GuardDuty EKS Protection (audit log monitoring) and Runtime Monitoring, audit logs to CloudWatch, Security Hub.
- Upgrades: stay on supported versions; patch add-ons.
Enlarge diagram
Swipe sideways to see all of it, or tap to open it full screen.