Partial Policy Application
Symptom: Kyverno is working for some policies but not others. How can I see what’s going on?
Solution: The first thing is to check the logs from the Kyverno Pod to see if it describes why a policy or rule isn’t working.
Check the Pod logs from Kyverno. Assuming Kyverno was installed into the default Namespace called
kyverno
use the commandkubectl -n kyverno logs <kyverno_pod_name>
to show the logs. To watch the logs live, add the-f
switch for the “follow” option.If no helpful information is being displayed at the default logging level, increase the level of verbosity by editing the Kyverno Deployment. To edit the Deployment, assuming Kyverno was installed into the default Namespace, use the command
kubectl -n kyverno edit deploy kyverno-<controller_type>-controller
. Find theargs
section for the container namedkyverno
and either add the-v
switch or increase to a higher level. The flag-v=6
will increase the logging level to its highest. Take care to revert this change once troubleshooting steps are concluded.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.