Try It Out
In this example we will deploy Kyverno on a Kubernetes cluster using the Minimus Kyverno Helm chart. Kyverno will provide Kubernetes-native policy management for validating, mutating, and generating resources.
Step 1: Start Cluster
If you have a cluster to work with, skip this step. Otherwise, start a Minikube cluster. Deployment instructions
Step 2: Create Namespace
Create a namespace:
kubectl create ns kyverno
Step 3: Deploy the Helm Chart
Deploy the Minimus Helm chart:
helm install my-kyverno oci://helm.mini.dev/kyverno \
--version 3.7.1 \
-n kyverno \
--wait
If you want to override the chart's defaults, go to the Values tab, save a copy locally with your changes. Deploy the chart with your overrides using -f values.yaml:
helm install my-kyverno oci://helm.mini.dev/kyverno \
--version 3.7.1 \
-f values.yaml \
-n kyverno \
--wait
Step 4: Verify Kyverno is Running
Confirm the chart deployed successfully and Kyverno started:
kubectl get pods -n kyverno
You should see output similar to:
NAME READY STATUS RESTARTS AGE
my-kyverno-admission-controller-xxxxxxxxx-xxxxx 1/1 Running 0 2m
my-kyverno-background-controller-xxxxxxxxx-xxxxx 1/1 Running 0 2m
my-kyverno-cleanup-controller-xxxxxxxxx-xxxxx 1/1 Running 0 2m
my-kyverno-reports-controller-xxxxxxxxx-xxxxx 1/1 Running 0 2m
Step 5: Test Policy Enforcement
Create a sample validation policy to verify Kyverno is working:
cat <<EOF | kubectl apply -f -
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: require-labels
spec:
validationFailureAction: Audit
rules:
- name: check-for-labels
match:
any:
- resources:
kinds:
- Pod
validate:
message: "The label 'app.kubernetes.io/name' is required."
pattern:
metadata:
labels:
app.kubernetes.io/name: "?*"
EOF
Wait for the policy to become ready:
kubectl wait --for=condition=Ready clusterpolicy/require-labels --timeout=60s
You should see:
clusterpolicy.kyverno.io/require-labels condition met
Step 6: Clean Up
Uninstall the chart and delete the namespace to remove all resources:
helm uninstall my-kyverno -n kyverno
kubectl delete namespace kyverno
Terms & Info
Trademark
This catalog is published by Minimus. All product names, logos, and marks, other than those belonging to Minimus, shown are owned by their respective rights holders and appear here only to identify the open source software each image contains. Minimus claims no ownership of those marks and implies no affiliation with, endorsement by, certification by, or sponsorship by any rights holder.
Disclaimer
Images are provided "as-is" without warranty of any kind. "Hardened" refers to the security configuration applied at the time of build and does not constitute a guarantee of ongoing security or absence of vulnerabilities. The free tier is provided without support, SLA, or guaranteed patching timelines. Security updates may be applied to paid subscriptions before or instead of free tier images. By pulling or using any image you agree to our Terms of Use.