Containers and Kubernetes power modern apps — and introduce new attack surface at every layer.
Cloud → Cluster → Container → Code
Security at each layer builds on the one outside it. A weakness in any layer can undermine the rest.
:latest; sign images (cosign/Sigstore).USER; drop Linux capabilities.--privileged ≈ root on the host.| Area | Control |
|---|---|
| API server | The crown jewel — lock down access, enable audit logs |
| RBAC | Least-privilege roles; avoid cluster-admin sprawl |
| Network Policies | Default-deny pod-to-pod traffic; segment namespaces |
| Secrets | Encrypt etcd at rest; use external secret stores |
| Pod Security | Pod Security Standards/admission control (no privileged pods) |
| Admission control | OPA/Gatekeeper or Kyverno to enforce policy |
etcd stores all cluster state and secrets — encrypt it at rest and restrict access tightly. Compromising etcd compromises the whole cluster.
cluster-admin for apps).Your image is only as trustworthy as everything inside it. Scan, sign, and verify; generate an SBOM (next lesson) so you know exactly what's in each image when the next Log4Shell drops.