Interview Prep/DevSecOps/Kubernetes Security Posture

Which metrics show Kubernetes security posture over time?

BeginnerProductionKubernetes Security Posture
Answer
  • Percentage of namespaces enforcing PSA restricted.
  • Percentage of namespaces with default-deny NetworkPolicy.
  • Workloads running as root, privileged, or with hostPath/hostNetwork.
  • Images with critical fixable CVEs running in production, and their age.
  • Percentage of running images that are signed and verified at admission.
  • Count of subjects with cluster-admin, and policy violations in Audit mode trending to zero.
  • Clusters on a supported Kubernetes version.

Kyverno policy reports and Trivy Operator CRDs export most of this to Prometheus.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Kubernetes Security Posture