Interview Prep/DevSecOps/Container image and IaC scanning

Trivy Operator creates thousands of `VulnerabilityReport` objects and etcd size alerts fire

AdvancedTroubleshootingContainer image and IaC scanning
Answer

Likely causes → Reports per ReplicaSet revision and per container, kept for old ReplicaSets, plus frequent rescans across many namespaces.

Diagnose →

kubectl get vulnerabilityreports -A --no-headers | wc -l
kubectl get --raw /metrics | grep apiserver_storage_objects | grep -i aquasecurity

Fix → Limit scope and history: set revisionHistoryLimit low on Deployments, exclude system namespaces (excludeNamespaces), raise the report TTL scan interval, and disable report types you do not use (config audit, RBAC) in Helm values.

Prevent → Export reports to an external store or dashboard instead of keeping everything in etcd; size-test operators before cluster-wide rollout.

All DevSecOps questions

More on Container image and IaC scanning