Interview Prep/Azure/AKS and ACR

How do you keep ACR images clean and secure?

IntermediateConceptAKS and ACR
Answer
  • Retention/purge: az acr run --cmd "acr purge --filter 'shop/web:.*' --ago 30d --keep 10 --untagged" /dev/null on a schedule via an ACR task.
  • Retention policy for untagged manifests (Premium).
  • Vulnerability scanning with Microsoft Defender for Containers (scans pushed and pulled images, surfaces findings in Defender for Cloud).
  • Immutable tags: lock production tags with az acr repository update --image shop/web:1.4.2 --write-enabled false.
  • Private Endpoint and --public-network-enabled false for prod registries.
  • Sign images (Notation with Key Vault certs) and enforce signature verification with Ratify + Azure Policy.
Azure All Azure questions Roadmap: AKS & Azure DevOps

More on AKS and ACR