Open Policy Agent · Lesson 7 of 9 · 3 min read
A starter policy set for EKS
| Policy | Why |
|---|---|
| Images only from approved registries (your ECR, maybe a pull-through cache) | Supply-chain control |
No :latest / require pinned tags (or digests) |
Reproducibility, safe rollbacks |
| No privileged containers, no host namespaces/hostPath, drop capabilities | Container escape prevention (or PSA restricted) |
runAsNonRoot, allowPrivilegeEscalation: false, read-only root FS |
Least privilege |
| CPU/memory requests and memory limits required | Scheduling sanity, noisy-neighbour prevention |
| Liveness/readiness probes required on Deployments | Safe rollouts |
| Owner / team / cost-centre labels on namespaces and workloads | Accountability, cost allocation |
No LoadBalancer Services or NodePorts in app namespaces (use shared Ingress) |
Cost and exposure control |
| Unique Ingress hosts | Prevent traffic hijacking between teams |
| Minimum replicas / PDB for production | Availability during node upgrades |
| Signed images only (Kyverno verifyImages or Gatekeeper + external data) | Only CI-built images run |
Start with the first five — they give the most risk reduction for the least friction.
Enlarge diagram
Swipe sideways to see all of it, or tap to open it full screen.