Thursday, January 5, 2023

Gatekeeper/policycontroller kubectl cheat sheet

Gatekeeper/policycontroller cheat sheet.

List all the constraint templates
kubectl get constrainttemplates -l="configmanagement.gke.io/configmanagement=config-management"
Get the status of a particular constraint, including logged violations:
kubectl get k8sallowedrepos.constraints.gatekeeper.sh repo-is-gcr
Get the policy controller logs:
kubectl logs -n gatekeeper-system -l gatekeeper.sh/system=yes

No comments: