Kyverno & Kyverno Policies
Kyverno is an application to manage security policies in Kubernetes. Security policies appear in Kyverno as Kubernetes resources.
Kyverno supports tools, such as kubectl, git, and kustomize. You can use the Kyverno command-line interface to test policies and validate resources as part of the CI/CD pipeline.
Kyverno-policies is a Kyverno extension.
Kyverno-policies includes an implementation of Kubernetes Pod Security Standards (PSS). When you install the extension, you can select a policy mode: audit (notify only) or enforce (block). The original policies are stored in a separate Kyverno-policies repository.
You can send notifications from Kyverno to other systems using the kyverno-policy-reporter extensions. Kyverno-policy-reporter supports export to Yandex Object Storage (s3).
Tip
To find vulnerabilities in Kubernetes clusters, use Chaos Mesh. Vulnerability detection will help you configure security policies.
Warning
Updating to a new version from versions published before 2026 is not supported.
Updating older versions
Plan a short maintenance window: these steps briefly remove Kyverno admission control from
the cluster. Runkubectlagainst the target cluster.
0. (Recommended) Back up custom policies
Step 3 deletes Kyverno’s CRDs, which removes all ClusterPolicy/Policy objects — including
any you authored. (The bundled Pod Security Standards policies are re-created automatically by the
new product; only your own custom policies need saving.) Historical PolicyReports are also
removed and will be regenerated after reinstall.
kubectl get clusterpolicies.kyverno.io,policies.kyverno.io -A -o yaml > my-kyverno-policies-backup.yaml
1. Remove the old version via the Marketplace
Delete the old application through the Marketplace, not with raw helm uninstall:
- Console: Managed Service for Kubernetes → your cluster → Marketplace / installed
applications → delete the Kyverno application; or - Terraform: remove the
yandex_kubernetes_marketplace_helm_releaseresource and
terraform apply(destroy).
This runs the old chart’s pre-delete hook (which removes Kyverno’s admission webhooks) and
clears the Marketplace’s record of the install. A raw helm uninstall skips the Marketplace and
orphans the app record, later causing AlreadyExists when you install the new version.
2. Delete any leftover Kyverno admission webhooks — critical
Kyverno self-registers its webhooks at runtime. If any survive step 1 (e.g. the old pod was
unhealthy and the pre-delete hook didn’t run), they point at a Service that no longer exists and
block all pod creation cluster-wide. Verify none remain, and delete any that do:
kubectl get validatingwebhookconfigurations,mutatingwebhookconfigurations | grep kyverno
kubectl get validatingwebhookconfigurations,mutatingwebhookconfigurations -o name \
| grep kyverno | xargs -r kubectl delete
3. Delete the old Kyverno CRDs — required
Helm installs a chart’s CRDs (the crds/ directory) only when the CRDs don’t already exist —
it never updates or replaces existing ones. If the old (Kyverno 1.9) CRDs remain, the new
install keeps the stale definitions and the new v1.18 controllers crash-loop on their CRD sanity
checks (missing ephemeralreports.reports.kyverno.io, the policies.kyverno.io group, etc.).
Delete every Kyverno CRD so the new, correct set is installed:
kubectl get crd -o name | grep -E 'kyverno\.io|wgpolicyk8s\.io' | xargs -r kubectl delete
This also removes old CRD types dropped in v1.18 (e.g. generaterequests, updaterequests).
4. Delete the old namespace
Remove the namespace the old version used (or confirm it’s empty before reusing it):
kubectl delete namespace <old-namespace>
5. Verify the cluster is clean
kubectl get crd | grep -E 'kyverno\.io|wgpolicyk8s\.io' # none
kubectl get validatingwebhookconfigurations,mutatingwebhookconfigurations | grep kyverno # none
kubectl get ns <old-namespace> # NotFound
6. Install the new version
Install the new Kyverno version.
Then verify and re-apply any custom policies from step 0:
kubectl -n <namespace> get pods # 4 controllers Running: admission/background/cleanup/reports
kubectl get clusterpolicies.kyverno.io # the PSS policies, READY=true
When reviewing backed-up custom policies, note Kyverno v1.18 moved
spec.validationFailureActionto per-rulespec.rules[].validate.failureAction
(Audit/Enforce).
- Create a node group for Kyverno.
- Configure the application:
- Namespace: Create a new namespace, e.g.,
kyverno-space. If you leave the default namespace, Kyverno may work incorrectly. - Application name: Enter a name for the application.
- Kyverno policies activation: Select the kyverno-policies extensions for an automatic install in Kyverno.
- Pod Security Standard profile: Select the Pod Security Standard profile:
baseline,restricted, orprivileged. If the field is left blank, it will be set tobaselineby default. - Validation failure action: Select a response to Kyverno triggering:
audit(notify only) orenforce(block). If the field is left blank, it will be set toauditby default.
- Namespace: Create a new namespace, e.g.,
- Click Install.
- Wait for the application to change its status to
Deployed.
For more information about tracking when Kyverno is triggered, see the instructions.
If you no longer need the application, delete it. Next, clear the application’s webhook configurations, or else the cluster will not run properly.
- Managing the environment independently from workload configurations.
- Scanning the current workload to optimize Kubernetes cluster performance.
- Blocking or modifying API calls to optimize Kubernetes cluster performance.
- Validating, mutating, and generating Kubernetes resources.
- Ensuring the security of the OCI image supply chain.
Yandex Cloud technical support is available 24/7 to respond to requests. Available support modes and response times depend on your support plan. You can enable paid support in the management console. Learn more about requesting technical support.
| Helm chart | Version | Pull-command | Documentation |
|---|---|---|---|
| yandex-cloud/kyverno/charts/kyverno | 3.8.1 | Open |
| Docker image | Version | Pull-command |
|---|---|---|
| yandex-cloud/kyverno/kyvernopre1784119283108724882851268354215029534556359918548 | v1.18.1 | |
| yandex-cloud/kyverno/kyverno1784119283108724882851268354215029534556359918548 | v1.18.1 | |
| yandex-cloud/kyverno/background-controller1784119283108724882851268354215029534556359918548 | v1.18.1 | |
| yandex-cloud/kyverno/cleanup-controller1784119283108724882851268354215029534556359918548 | v1.18.1 | |
| yandex-cloud/kyverno/reports-controller1784119283108724882851268354215029534556359918548 | v1.18.1 | |
| yandex-cloud/kyverno/kyverno-cli1784119283108724882851268354215029534556359918548 | v1.18.1 | |
| yandex-cloud/kyverno/readiness-checker1784119283108724882851268354215029534556359918548 | v1.18.1 | |
| yandex-cloud/kyverno/readiness-checker1784119283108724882851268354215029534556359918548 | v1.18.1 | |
| yandex-cloud/kyverno/kubectl1784119283108724882851268354215029534556359918548 | v1.31.4 |