cert-manager: Verifying Install: "failed calling admission webhook" (Azure, GKE private cluster)
Describe the bug: Upon re-installing cert-manager and trying to verify the install, the admission api is failing with the following description:
kubectl describe APIService v1beta1.admission.certmanager.k8s.io
Name: v1beta1.admission.certmanager.k8s.io
Namespace:
Labels: app=webhook
chart=webhook-v0.6.4
heritage=Tiller
release=cert-manager
Annotations: <none>
API Version: apiregistration.k8s.io/v1
Kind: APIService
Metadata:
Creation Timestamp: 2019-03-01T10:08:13Z
Resource Version: 13956808
Self Link: /apis/apiregistration.k8s.io/v1/apiservices/v1beta1.admission.certmanager.k8s.io
UID: ecc47923-3c09-11e9-bae6-6e4899a3d5f0
Spec:
Ca Bundle: LS0tLS1<removed for brevity>LS0tCg==
Group: admission.certmanager.k8s.io
Group Priority Minimum: 1000
Service:
Name: cert-manager-webhook
Namespace: cert-manager
Version: v1beta1
Version Priority: 15
Status:
Conditions:
Last Transition Time: 2019-03-01T10:08:13Z
Message: no response from https://10.0.233.160:443: Get https://10.0.233.160:443: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Reason: FailedDiscoveryCheck
Status: False
Type: Available
Events: <none>
This manifests when trying to apply the test-resources.yaml for verifying the install, with the following output:
kubectl apply -f test-resources.yaml
namespace "cert-manager-test" created
Error from server (InternalError): error when creating "test-resources.yaml": Internal error occurred: failed calling admission webhook "issuers.admission.certmanager.k8s.io": the server is currently unable to handle the request
Error from server (InternalError): error when creating "test-resources.yaml": Internal error occurred: failed calling admission webhook "certificates.admission.certmanager.k8s.io": the server is currently unable to handle the request
Expected behaviour: Test Resources should be created successfully with no errors.
Steps to reproduce the bug:
Note: I have removed all other items from my cluster and following the install of the CRD’s, created the name space, labelled the name space, then tried the install via helm using the following commands:
kubectl apply -f https://raw.githubusercontent.com/jetstack/cert-manager/v0.6.2/deploy/manifests/00-crds.yaml
kubectl create namespace cert-manager
kubectl label namespace cert-manager certmanager.k8s.io/disable-validation=true
helm install --name cert-manager --namespace cert-manager --version v0.6.6 stable/cert-manager
Anything else we need to know?: I have previously installed cert-manager successfully on this cluster. I was then trying to get the nginx-ingress working but got into a bit of a mess. So I deleted all resources created (via helm), and tidied up any orphaned objects - so I could start from scratch again. However, I’m now running into this issue.
The only similar issue I’ve seen is this https://github.com/helm/charts/issues/10869. But I’m unsure what the resolution to this is.
All other objects appear to have been created and started successfully. I haven’t been able to see any other error messages having gone through the logs for the different pods.
Environment details::
- Kubernetes version (e.g. v1.10.2): v1.11.3
- Cloud-provider/provisioner (e.g. GKE, kops AWS, etc): Azure
- cert-manager version (e.g. v0.4.0): 0.6.6
- Install method (e.g. helm or static manifests): Helm
/kind bug
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 14
- Comments: 36 (3 by maintainers)
I am facing same exact issue with 0.9.1 version as well. any update on this issue ?
I’m also getting this issue, the webhook pod never comes up:
The secret doesn’t exist.
i’m hitting the same problem on a GKE private cluster. i’ve attempted to allow maximal access on port 6443, but i’m hitting the same issue (test fails with
failed calling admission webhook
) and i get the same error fromkubectl describe APIService v1beta1.admission.certmanager.k8s.io
:i’ve given up on getting the webhook to work for now, and am sticking with
cert-manager-no-webhook.yaml
, but i’d love a resolution to this issueWe’re hitting the same issue in GKE. Is there any staff follow-up to this issue?
guys the biggest problem is that you are installing it without webhook.Enabled. If you do that you cannot use clusterissuers because kube apiservice is not there.
So what I did is
after that creating clusterissuer works and I can see that certificates are created automatically.
I had the same and i am a bit afraid this is due to my network policies in place.
Here my workflow to migrate from with webhook to without - NO WARRANTY!
I’m also getting this on bare metal, and I’m scratching my head as to what to do about it. In case the details are useful:
I have a functioning set of pods:
But when I try to apply my Issuer yaml:
I get:
I’d love pointers on how to debug further. This is as far as I’ve gotten:
Somewhere along my google searching I came across “kubectl get apiservice” which let me see the following:
Notably, the “v1beta1.admission.certmanager.k8s.io” seems to be failing it’s availability checks. Looking into it I see:
The message of being unable to connect to https://10.43.216.179 looks suspicious, so I look into my services:
And they seem fine? Describing the svc has it using selectors that match the pod itself, so all of that seems to be running?
I’m not sure if it’s a connection issue, but I’m unsure what node the API service is running on, and how I can debug connectivity issues?
If it helps, this whole cluster is a bunch of VMs brought up by vagrant. The vagrantfile looks like this:
Apologies for the deluge of information; but I’m hoping someone else has run into this.
Ditto, on GKE, freshly minted cluster.
I am seeing this same issue with
v0.7
as well, from installing via the manifests.after running this command it worked, looks like an access role issue
kubectl create clusterrolebinding cluster-system-anonymous --clusterrole=cluster-admin --user=system:anonymous
Please use this command for test purposes, as it grants anyone access to perform any action on the cluster. THIS IS NOT A FIX
We were having the same issue using flux helm operator. To share some insights from the past, upgrading helm charts throughout “major” updates/version bumps never really worked. Usually we just delete (–purge) the release before doing this kind of bigger leaps.
So apparently one of our clusters got rid of
v1beta1.admission.certmanager.k8s.io
apiservice by itself with deletion of the helm release. The other ones got stuck with the aforementioned “failed calling admission webhook”.Coming from v.0.6.X it seems that v0.10 now has
v1beta1.webhook.certmanager.k8s.io
instead ofv1beta1.admission.certmanager.k8s.io
.TLDR; Just tried by deleting the helm release multiple times, but the “old” apiservice didn’t get removed. So I went on cleaning up with
kubectl delete apiservice v1beta1.admission.certmanager.k8s.io
. Everything’s gucci.I’m also experiencing all of the issues listed in this thread.
Commands that I ran:
Output from the
kube-apiserver
:Output from
k get apiservices.apiregistration.k8s.io
shows the following:This was performed on a brand new, fresh k8s cluster running on Ubuntu on bare metal using RKE to set up the cluster.
Kubernetes version: 1.13.5 Helm version: 2.13.0 cert-manager version: 0.8.1
We ended up having to punt on cert-manager for now because of this issue. We are going to deploy a self-signed cert for the Nginx ingress for now and reevaluate when cert-manager resolves these issues.
@woodwardmatt using cert-manager without the webhook actually works fine – just don’t submit invalid resources! curious what you’re using instead of
cert-manager
to get SSL certs on k8s. did you go back to buying them and copying them into k8s secrets by hand?@igor47 sorry i didn’t add a disclaimer. i was suggesting what might be the problem. didn’t ask anyone to use the command, i haven’t figured out the actual permissions needed. Thanks for alerting me.
it also worked for me when i allowed port 6443 in firewall rule for my private GKE cluster . way to troubleshoot is to do : install Custom Resouces , install cert-manager following all standanrd then check for v1beta1.admission.certmanager.k8s.io cert-manager/cert-manager-webhook False (FailedDiscoveryCheck) using --> kubectl get apiservice
then describe to find out the blocking port .
But can anyone tell me how good is to expose port 6443 on a private GKE cluster 😃
I came here because I got mail with
ACTION REQUIRED
because Lets Encrypt does only support 0.8.0 cert-manager instances (current jetstack/cert-manager version) and onwards in a couple of weeks. Air is getting thin. Experiencing the same issues on 0.9.1.That just doesn’t work. Thought that was a stable release
I had a configuration that was not deleted by ValidatingWebhookConfiguration because of this there was an error. I do not use cert-manager-webhook