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/nullon 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 falsefor prod registries. - Sign images (Notation with Key Vault certs) and enforce signature verification with Ratify + Azure Policy.
More on AKS and ACR
What does Microsoft manage in AKS and what do you manage?BeginnerWhat is the difference between system and user node pools?BeginnerCompare the AKS networking options: kubenet, Azure CNI, Azure CNI Overlay, Azure CNI Powered by Cilium.AdvancedHow many IPs does an AKS subnet need with flat Azure CNI vs Overlay?AdvancedWhat are the AKS tiers (Free, Standard, Premium)?IntermediateHow do AKS Kubernetes version upgrades work?Intermediate