Interview Prep/DevSecOps/Kubernetes Security Posture

Why do we run a private registry with a pull-through cache for public images?

BeginnerProductionKubernetes Security Posture
Answer
  • One controlled place for images: scan, sign or approve before clusters use them.
  • Protection from upstream outages, Docker Hub rate limits and images being deleted or retagged upstream.
  • Clusters only need egress to our registry, not to the whole internet.
  • An admission policy can then simply require registry.example.com/ or our ECR prefix.
aws ecr create-pull-through-cache-rule --ecr-repository-prefix docker-hub \
  --upstream-registry-url registry-1.docker.io \
  --credential-arn arn:aws:secretsmanager:eu-west-1:111122223333:secret:ecr-pullthroughcache/dockerhub
All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Kubernetes Security Posture