Getting started

Policy Reporter can easily installed with Helm 3 or with the provided static manifest files. It consists of four parts and can be installed and configured as needed.

Installation

Helm Repository

helm repo add policy-reporter https://kyverno.github.io/policy-reporterhelm repo update

Core Installation

Install only the core application to get REST APIs and/or a metrics endpoint. Both are optional and disabled by default.

Helm 3
helm upgrade --install policy-reporter policy-reporter/policy-reporter --create-namespace -n policy-reporter --set metrics.enabled=true --set api.enabled=true
Static Manifests
kubectl apply -f https://raw.githubusercontent.com/kyverno/policy-reporter/main/manifest/policy-reporter/namespace.yamlkubectl apply -f https://raw.githubusercontent.com/kyverno/policy-reporter/main/manifest/policy-reporter/install.yaml

Access your metrics endpoint on http://localhost:8080/metrics via Port Forward:

kubectl port-forward service/policy-reporter 8080:8080 -n policy-reporter

Access your REST API endpoints at http://localhost:8080/v1/targets via port forwarding:

kubectl port-forward service/policy-reporter 8080:8080 -n policy-reporter

See API Reference for all available endpoints.

Core + Policy Reporter UI

Install the Policy Reporter core application and the Policy Reporter UI. This installation also sets Policy Reporter UI as an alert target for new violations.

Helm 3
helm upgrade --install policy-reporter policy-reporter/policy-reporter --create-namespace -n policy-reporter --set ui.enabled=true
Static Manifests
kubectl apply -f https://raw.githubusercontent.com/kyverno/policy-reporter/main/manifest/policy-reporter-ui/namespace.yamlkubectl apply -f https://raw.githubusercontent.com/kyverno/policy-reporter/main/manifest/policy-reporter-ui/config-secret.yamlkubectl apply -f https://raw.githubusercontent.com/kyverno/policy-reporter/main/manifest/policy-reporter-ui/install.yaml

Access Policy Reporter at http://localhost:8081 via port forwarding:

kubectl port-forward service/policy-reporter-ui 8081:8080 -n policy-reporter
Dashboard light Dashboard dark

Core + Policy Reporter UI + Kyverno Plugin

Install the Policy Reporter core application, Policy Reporter Kyverno Plugin, and the Policy Reporter UI with the Kyverno views enabled. This installation also sets Policy Reporter UI as an alert target for new violations.

Helm 3
helm upgrade --install policy-reporter policy-reporter/policy-reporter --create-namespace -n policy-reporter --set kyvernoPlugin.enabled=true --set ui.enabled=true --set ui.plugins.kyverno=true
Static Manifests
kubectl apply -f https://raw.githubusercontent.com/kyverno/policy-reporter/main/manifest/policy-reporter-kyverno-ui/namespace.yamlkubectl apply -f https://raw.githubusercontent.com/kyverno/policy-reporter/main/manifest/policy-reporter-kyverno-ui/config-secret.yamlkubectl apply -f https://raw.githubusercontent.com/kyverno/policy-reporter/main/manifest/policy-reporter-kyverno-ui/install.yaml

Access Policy Reporter at http://localhost:8081 via port forwarding:

kubectl port-forward service/policy-reporter-ui 8081:8080 -n policy-reporter
Kyverno Policy Dashboard light Kyverno Policy Dashboard dark

Policy Reporter + Prometheus Operator

Install Policy Reporter core application with metrics enabled and the monitoring subchart to install a ServiceMonitor and three pre-configured Grafana Dashboards. Change the monitoring.grafana.namespace as needed as well as monitoring.serviceMonitor.labels to match the serviceMonitorSelector of your Prometheus CRD.

See Helm Chart - Monitoring for details.

helm upgrade --install policy-reporter policy-reporter/policy-reporter --set monitoring.enabled=true --set monitoring.grafana.namespace=monitoring --set monitoring.serviceMonitor.labels.release=monitoring -n policy-reporter --create-namespace
Grafana Policy Reports Dashboard Grafana Policy Reports Dashboard Grafana Policy Reports Dashboard