Prerequisites
Before using Kyverno policies, ensure you have:- ArgoCD installed: Required for GitOps-based policy deployment. See GitOps with ArgoCD for setup instructions.
- At least one connected cluster: Policies deploy to clusters connected to Skyhook.
Installing Kyverno
Kyverno is delivered as a GitOps addon. Installing it creates the required manifests in your GitOps repository and syncs them to your clusters via ArgoCD.Step 1: Verify ArgoCD Installation
- Go to Settings > GitOps
- Confirm that ArgoCD shows as Installed and Healthy
- If not installed, follow the setup instructions in GitOps with ArgoCD
Step 2: Open the Kyverno Addon Page
Access the Kyverno addon configuration through either path:- From Dashboard: Navigate to Dashboard > Addons > Kyverno and click Install Kyverno
- From Settings: Navigate to Settings > Infrastructure > Kyverno
Step 3: Enable Kyverno on Clusters
On the Kyverno addon page:- View the list of connected clusters with their addon configuration
- For each cluster where you want Kyverno, set
enabled: trueusing the UI toggle or YAML editor - Click Save / Apply to commit the configuration
- Updates the Kyverno addon values in your GitOps repository
- Creates a pull request if your organization uses PR-based changes
- Relies on ArgoCD to sync the Kyverno resources to your clusters
Step 4: Verify Installation
Once changes are applied:- Return to the Kyverno addon page or the Kyverno card on the Dashboard
- Verify:
- Installed / Not Installed status for Kyverno
- The number of clusters where Kyverno is enabled
Accessing Policies
Once Kyverno is installed and enabled:- Go to Settings > Policies to see all Kyverno policies across your organization
- Alternatively, use Settings > Infrastructure > Kyverno to access the Kyverno configuration and policy view
Policy List
The policy list displays all deployed Kyverno policies across clusters with the Kyverno addon enabled.Table Columns
| Column | Description |
|---|---|
| Policy Name | Unique identifier of the policy |
| Type | Validation, Mutation, Generation, or ImageVerification |
| Category | Security, BestPractices, Compliance, or Custom |
| Mode | Audit (report only) or Enforce (block violations) |
| Scope | Cluster-wide or Namespaced |
| Cluster | Target cluster(s) - shows “All Clusters” for base-level policies |
| Last Updated | When the policy was last modified |
| Status | Active or Inactive based on Kyverno addon status |
Filtering Policies
Use the filter dropdowns to narrow down the policy list:- Type: Filter by policy type (Validation, Mutation, Generation, ImageVerification)
- Category: Filter by category (Security, BestPractices, Compliance, Custom)
- Mode: Filter by enforcement mode (Audit or Enforce)
- Cluster: Filter by specific cluster
- Namespace: Filter by namespace (for namespaced policies)
Understanding “All Clusters”
Policies shown with “All Clusters” in the Cluster column are base-level policies that apply across all clusters where Kyverno is enabled. These are defined once and deployed to all clusters automatically.Adding a New Policy
Click Add Policy to create a new policy.Step 1: Select Template or Custom
Choose how to create your policy:- Using a Template
- Custom YAML
- Select the Use Template tab
- Browse available templates by category and type
- Click on a template to select it
- Requiring resource limits on pods
- Blocking privileged containers
- Enforcing image pull policies
- Requiring specific labels or annotations
Step 2: Configure Policy Settings
- Policy Scope: Choose between ClusterPolicy (cluster-wide) or Namespaced Policy
- Enforcement Mode:
- Audit: Violations are reported but not blocked
- Enforce: Violations are blocked
- Review the YAML preview
Step 3: Select Target Clusters
- Select target clusters for deployment
- For namespaced policies, select specific namespaces within each cluster
- Use the search box to find clusters by name, provider, or region
Step 4: Create the Policy
Click Create Policy to generate a pull request with your policy changes. Once the PR is merged, ArgoCD deploys the policy.Policy Details
Click on any policy in the list to open the details drawer.Overview Tab
- Enforcement Mode: Toggle between Audit and Enforce modes (click Apply after changing to create a PR with the update)
- Metadata: Policy name, namespace, and status
- Target Resources: Kubernetes resources the policy applies to
Rules Tab
View individual rules within the policy:- Rule name and type
- Match conditions
- Exclude conditions
- Rule logic
YAML Tab
View the complete policy YAML definition.Managing Clusters
Click Manage Clusters to configure which clusters have Kyverno enabled. This opens the Kyverno addon configuration page where you can:- Enable/disable Kyverno on specific clusters
- Configure Kyverno addon settings
- View installation status
GitOps Workflow
All policy changes follow a GitOps workflow:- Create/Modify Policy: Use the UI to create or update policies
- Pull Request: A PR is automatically created with your changes
- Review & Merge: Review the PR and merge when ready
- Automatic Deployment: ArgoCD syncs the changes to your clusters
Observing Policy Effects
Once policies are deployed, observe their effects in several places.In the Skyhook UI
- Policy Status: In Settings > Policies, each policy shows its Mode (Audit/Enforce), Scope, Cluster, and Status
- Addon Status: On the Kyverno addon page, verify the list of clusters where Kyverno is enabled and healthy
In Kubernetes Events
On clusters where Kyverno is enabled, policy activity appears in Kubernetes events: Admission events / rejections: When a policy is in Enforce mode and blocks a resource, the API server returns a validation error. View these failures in:kubectloutput when applying manifests- Cluster events for the affected resource
Policy Reports
If your Kyverno installation is configured to producePolicyReport or ClusterPolicyReport resources:
Best Practices
Start with Audit Mode
Test new policies in Audit mode before enforcing to understand their impact without blocking workloads.
Use Templates
Leverage pre-built templates for common security and compliance policies rather than writing from scratch.
Target Specific Resources
Be specific about which resources a policy applies to. Overly broad policies can cause unexpected blocks.
Review Before Merging
Always review the generated PR before merging. Verify the policy YAML and target clusters are correct.
Troubleshooting
ArgoCD Not Installed error
ArgoCD Not Installed error
Kyverno policy management requires ArgoCD for GitOps deployment.Solution: Visit Settings > GitOps to install and configure ArgoCD. Follow the setup wizard to complete the installation.
Policies show as Inactive
Policies show as Inactive
Policies appear inactive when Kyverno is not enabled on the target cluster.Solution: Enable Kyverno on the cluster through the addon settings:
- Go to Settings > Infrastructure > Kyverno
- Enable Kyverno on the affected cluster
- Wait for ArgoCD to sync the changes
No namespaces available when creating namespaced policy
No namespaces available when creating namespaced policy
If no namespaces appear when creating a namespaced policy:Check:
- The cluster is connected and accessible
- Namespaces exist in the target cluster
- You have permissions to list namespaces
Policy not taking effect
Policy not taking effect
If a policy is deployed but not validating resources:Check:
- Verify the policy is in Enforce mode (Audit mode only reports, doesn’t block)
- Confirm the policy matches the target resources (check
matchconditions in the YAML) - Review Kyverno controller logs:
- Check if the resource was created before the policy was applied (policies only affect new resources by default)
Next Steps
- Learn about GitOps with ArgoCD for managing deployments
- Configure your management cluster settings
- Explore Kyverno documentation for advanced policy patterns
