kyverno: [Bug] Deploying kyverno-policies chart with custom values fails
Kyverno Version
1.10.1
Description
We are trying to apply kyverno policy using the helm chart. But the helmrelease is failing with the error
message: “Helm install failed: 17 errors occurred:\n\t* Internal error occurred: failed calling webhook "mutate-policy.kyverno.svc": failed to call webhook: Post "https://kyverno-svc.security.svc:443/policymutate?timeout=10s\”: no endpoints available for service "kyverno-svc"\n\t* Internal error occurred
But creating the kyverno policy through manifest is working fine
kyverno-policy chart version used: 3.0.1
values:
podSecurityStandard: baseline
podSecuritySeverity: medium
includeRestrictedPolicies:
- disallow-privilege-escalation
- disallow-capabilities-strict
- require-run-as-nonroot
- require-run-as-non-root-user
- restrict-seccomp-strict
- restrict-volume-types
failurePolicy: Ignore
validationFailureAction: audit
validationFailureActionByPolicy:
disallow-host-namespaces: enforce
background: true
Slack discussion
No response
Troubleshooting
- I have read and followed the documentation AND the troubleshooting guide.
- I have searched other issues in this repository and mine is not recorded.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 32 (15 by maintainers)
Hi,
The
wget
produces the following:The same check with
curl
gives a HTTP 200:The issue in my case was not the metrics server. I dont know why the error related to metrics server appear in the kyverno admission controller pod logs. This is something that started appearing after 3.0.0 ( keyverno version 2.10 ) and need to be addressed
After analyzing I found the issue to be: when we were creating more kyverno policy at once, it was hitting the max CPU limit and kyverno container was getting restarted. We were using flux to create around 30 kyverno policies and so all policies were created at once which throttled the CPU when requests came to kyverno pod in bulk.
Increasing the CPU limit resolved our issue