How do you continuously check the security posture of 20 clusters?
IntermediateScenarioKubernetes Security
Answer
Situation read → One-off audits go stale. Continuous scanning with central reporting is needed.
What I'd do →
- Deploy Trivy Operator or Kubescape in each cluster to scan workloads, RBAC and configs; export results as CRDs and metrics.
- Use the same policy engine rules (Kyverno/Gatekeeper) everywhere, rolled out by GitOps.
- Aggregate into a central dashboard (Grafana or a CNAPP like Wiz, Prisma, Defender for Cloud).
- Track trends: critical findings per cluster, time to fix.
- Fail cluster creation pipelines if baseline policies are missing.
Why → Consistency across clusters matters more than perfection in one.
Interview tip → Talk about posture as a metric over time, not a one-time report.
More on Kubernetes Security
What are the 4Cs of cloud native security?BeginnerWhat happens to a request between `kubectl apply` and etcd from a security point of view?IntermediateExplain Role, ClusterRole, RoleBinding and ClusterRoleBinding.BeginnerHow do you check what a user or service account is allowed to do?BeginnerWhich RBAC permissions are effectively cluster-admin in disguise?AdvancedHow do service account tokens work now, and what is `automountServiceAccountToken`?Intermediate