Interview Prep/Azure/AKS and Containers

Container images must be scanned and only signed images may run in prod. How do you build it?

AdvancedScenarioAKS and Containers
Answer

Situation read → Scan in CI and registry, sign after build, verify at admission.

What I'd do →

  1. CI: Trivy scan, fail on critical CVEs with fixes available
  2. Sign with Notation using a certificate in Key Vault: notation sign --plugin azure-kv --id <keyId> acrshop.azurecr.io/shop/web@sha256:...
  3. Defender for Containers scans ACR images continuously
  4. Install Ratify on AKS with Azure Policy (the signature verification policy) to deny unsigned images
  5. Restrict registries to acrshop.azurecr.io via policy

Why → Signing proves an image came from your pipeline; admission control enforces it.

Interview tip → Sign by digest, not tag; tags are mutable.

Azure All Azure questions Roadmap: AKS & Azure DevOps

More on AKS and Containers