Check constraint violations in status
Read the violation count and offending resources from the constraint's audit status, no new scan needed.
kubectl get k8srequiredlabels <name> -o jsonpath='{.status.totalViolations} {range .status.violations[*]}{"\n"}{.kind}/{.name}: {.message}{end}'
- tool
- opa-gatekeeper3 commands
More opa-gatekeeper commands
-
gator test -f policy/ && gator verify ./suiteTest templates and constraints against fixtures without a cluster, so policy mistakes show up in CI before deploy.
-
kubectl get constrainttemplates && kubectl get constraints -AShow all ConstraintTemplates and every constraint created from them in all namespaces.