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
Auditmode trending to zero. - Clusters on a supported Kubernetes version.
Kyverno policy reports and Trivy Operator CRDs export most of this to Prometheus.
More on Kubernetes Security Posture
What is your security baseline for a new production EKS cluster?IntermediateDraw the layered security controls for workloads on Kubernetes.BeginnerHow do you assign Pod Security Admission levels across namespaces in production?BeginnerKyverno, OPA Gatekeeper or ValidatingAdmissionPolicy: how do you choose?IntermediateShow a ValidatingAdmissionPolicy that blocks containers without resource limits.AdvancedHow do you roll out default-deny NetworkPolicies in a running production cluster?Intermediate