cert-manager: Internal error occurred: failed calling webhook "webhook.cert-manager.io": Post https://rancher-cert-cert-manager-webhook.cert-manager.svc:443/mutate?timeout=30s: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "cert-manager-webhook-ca")
Describe the bug:
I am using cert-manager to generate the certificate for Rancher. I am using helm chart to deploy both. (cert-manager version 0.16.1 and Rancher version 2.4.8). Cert-manager is deployed successfully but while deploying Rancher facing issues in generating certificate.
Internal error occurred: failed calling webhook "webhook.cert-manager.io": Post https://rancher-cert-cert-manager-webhook.cert-manager.svc:443/mutate?timeout=30s: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "cert-manager-webhook-ca")
Expected Behavior: It should deploy successfully.
Environment: Kubernetes : “v1.15.11-eks-af3caf” kubectl : v1.18.6 Install method: helm + kustomize (using Argo-CD)
There is no change in default values of charts.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 29 (4 by maintainers)
I getting pissed off by people who say the issue resolved, without explanation, what was done to solve it.
Hi @meyskens This issue got resolved for me. So closing it.
Hi, the problem eventually heels itself… You should simply wait ~20 seconds before creating issuer, after cert-manager deploy, to let cainjector to inject the CA certificates into webhook. Its not an issue… but the behaviour should be documented in cert-manager “Getting Started document”.
The problem I encountered is covered in https://github.com/jetstack/cert-manager/pull/3425#issuecomment-719690301, but to echo here: setting
namespace: cert-manager
(or anything else) in Kustomize leads to it overwriting the kube-system namespace specified in some RBAC-related resources, which caused this failure. Removingnamespace:
entirely so it would just use whatever is in the resource description resolved the problem (this does mean setting an alternate namespace would require more effort).I just ran into this issue, and I patched the ClusterRole with the following rule to access
configmaps
:Note that if you’re using Kustomize, you’ll have to provide all the required permissions because the patch will replace the
rules
in the ClusterRole, instead of appending the new rule to the list. Here’s a gist of the patch I’m using with Kustomize.Got nearly the same problem. It had probably persisted at least since
cert-manager
pod restarted 4 days ago.The logs of
cainjector
did not mention anything about RBAC. It looks like cainjector just hung itself silently without recovering, or exiting causing a proper restart.Needless to say this behavior is not optimal.
Hi @alexsorkin I tried this also. Waited for 10 min after cert-manager deployment but still the same issue.
value need a type map instead of array
this also works for kustomize rather than re-include all the original