Kyverno `PolicyReport` shows 400 `fail` results, but nothing was blocked
BeginnerTroubleshootingKubernetes admission control and Pod Security
Answer
Likely causes → Policies run with validationFailureAction: Audit (or failureAction: Audit in newer versions), and background scans report existing violations.
Diagnose →
kubectl get policyreport -A
kubectl get policyreport -n prod -o json | jq -r '.results[] | select(.result=="fail") | "\(.policy) \(.resources[0].name)"' | sort | uniq -c
Fix → That is expected in audit. Use the reports to drive fixes per team, then switch to Enforce.
Prevent → Publish policy reports to a dashboard (Policy Reporter) so teams see their own debt.
More on Kubernetes admission control and Pod Security
`Error from server: admission webhook "validate.kyverno.svc-fail" denied the request: policy Deployment/prod/api for resource violation: require-run-as-nonroot`BeginnerPods do not appear, but `kubectl apply` of the Deployment succeededBeginner`pods "api-7d9" is forbidden: violates PodSecurity "restricted:latest": allowPrivilegeEscalation != false, unrestricted capabilities, seccompProfile`BeginnerEnabling `enforce=restricted` on a namespace did not evict the existing non-compliant podsBeginner`Error from server (InternalError): Internal error occurred: failed calling webhook "validation.gatekeeper.sh": ... context deadline exceeded` blocks every deployIntermediateKyverno is down and now the whole cluster, including Kyverno's own namespace, cannot be fixed because writes are rejectedAdvanced