Closed jelel-fliss closed 2 years ago
I had the same issue with ClusterIssuer and traefik. Have you tried to remove 'solver spec' because it's optional? But i have no clue, why this property is set in all of the sample code and why it isn't necessary.
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
spec:
acme:
# The ACME server URL
server: https://acme-v02.api.letsencrypt.org/directory
# Email address used for ACME registration
email: myemail@example.com
# Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: letsencrypt-prod
# Enable the HTTP-01 challenge provider
solvers:
- http01:
ingress: { }
I've typically found this means that your ingress controller isn't reading the ingress object, or some other ingress supersedes a path collision. I most recently ran into this issue because I didn't have an IngressClass object. I've also run into this issue for not having the proper annotations setup correctly in the (Cluster)Issuer (same thing as an IngressClass before the ingress spec was marked as stable)
@jelel-fliss I too have the same issue, cert-manager version is 1.6.1 and k8s cluster version is 1.20.1. For the first deployment certificate was issued but now for all the new deplyments challenge and order both are in pending state
Somehow, I was able to resolve this. I could not find the real cause of this problem but I tried restarting the nginx service in the ingress controller containers and suddenly, the certificates were issued successfully.
kubectl exec -it <ingress-controller-pod> nginx -s reload
I did the same but it didn't solve my problem, I still doubt, if it is something to do with ingress controller version or cert-manager version though same versions were able to issue an SSL cert for one of the namespace 10days back and in the same cluster today challenges for SSL are pending
@sureshkachwa did you try a different version of cert-manager ? Before reloading the nginx-controller, I downgraded to the version 1.5.0. It still did not work after recreating the issuer and the ingress object. Also there are some changes I made to the Ingress that may have helped solving the issue. Still, only reloading NGINX in the ingress triggered the success of issuing the certificates.
metadata:
name: nginx-ingress
annotations:
kubernetes.io/ingress.allow-http: "true" # I added this
kubernetes.io/ingress.class: nginx # I added this
cert-manager.io/issuer: letsencrypt-prod
acme.cert-manager.io/http01-edit-in-place: "true"
kubernetes.io/tls-acme: "true"
spec:
#ingressClassName: nginx # I commented this
I removed the ingressClassName field in spec
@sureshkachwa did you try a different version of cert-manager ? Before reloading the nginx-controller, I downgraded to the version 1.5.0. It still did not work after recreating the issuer and the ingress object. Also there are some changes I made to the Ingress that may have helped solving the issue. Still, only reloading NGINX in the ingress triggered the success of issuing the certificates.
metadata: name: nginx-ingress annotations: kubernetes.io/ingress.allow-http: "true" # I added this kubernetes.io/ingress.class: nginx # I added this cert-manager.io/issuer: letsencrypt-prod acme.cert-manager.io/http01-edit-in-place: "true" kubernetes.io/tls-acme: "true" spec: #ingressClassName: nginx # I commented this
I removed the ingressClassName field in spec
@jelel-fliss , we are using helm to install ingress controller ,ingress controller is getting deployed with "webhook validation error" moreover I installed cert-manager 1.6.0 and nginx controller 4.0.8 but still the same issue, challenge is still pending,there is something that we need to work on, I'll see if I get a solution and share it here.
@jelel-fliss still same issue. I'll give a try with new k8s cluster and cert-manager with version 1.5.0, edit the ing object with above annotations and see if it helps.
@sureshkachwa can you share the logs of the ingress, certmanager pods and the events of the challenge ?
@jelel-fliss created a new cluster with cert-manager 1.6.0 and ingress controller 1.0.5.
Right now I see the below thing in the cluster:
NAMESPACE NAME CLASS HOSTS ADDRESS PORTS AGE
devops17 cm-acme-http-solver-886vl nginx devops17.nasty.orbitbi.com 129.154.226.113 80 6m45s
devops17 devops17-orbit-ing
Will wait for 15 more min and share all the logs here
@jelel-fliss logs for ing,cert-manager pods,acme pod, nginx controller is a huge file, can you share your email id I will share the logs
Now,I see a different error. cert-manager/controller/challenges "msg"="propagation check failed" "error"="failed to perform self check GET request 'http://devops17.nasty.orbitbi.com/.well-known/acme-challenge/Qbso0LFq4LbjK_YUV7Rtyvpon7a6I_NIESsLjd_AfJc': Get \"http://devops17.nasty.orbitbi.com/.well-known/acme-challenge/Qbso0LFq4LbjK_YUV7Rtyvpon7a6I_NIESsLjd_AfJc\": dial tcp: lookup devops17.nasty.orbitbi.com on 10.96.5.5:53: no such host" "dnsName"="devops17.nasty.orbitbi.com" "resource_kind"="Challenge" "resource_name"="wildcard-orbit-prod-tls-mtr5s-3076010998-709024210" "resource_namespace"="devops17" "resource_version"="v1" "type"="HTTP-01"
If the issuer http01 class is istio, the istio ingressClass resource is required.
Ignressclass yaml example
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
name: istio
namespace: istio-system
spec:
controller: istio.io/ingress-controller
Issue resolved after pods started resolving the fqdn for what ever domain the certificate needs to be issued, we earlier had a setup in oracle cloud OCI where we wanted our resources in a specific VCN to look at VCN DNS for resolution and not public DNS, removed that specific zone setting in OCI and that helped.
If the issuer http01 class is istio, the istio ingressClass resource is required.
Ignressclass yaml example
apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: name: istio namespace: istio-system spec: controller: istio.io/ingress-controller
This worked exceptionally! Resolved my issue.
Thank YOU!!!
Had the same problem with an ingressClassname: traefik-cert-manager
.
I looked for IngressClass on my cluster and found it was just traefik
.
I replaced it in the ClusterIssuer and the certificate has finally been issue properly !
running on kubernetes 1.21.x on azure here. same issue.
BUT only when i was trying to install grafana on a specific path like: monitoring.<FQDN>.io/grafana
.
cert-manager:
chart:
spec:
chart: cert-manager
sourceRef:
kind: HelmRepository
name: jetstack
namespace: unstable
version: v1.7.0
nginx:
chart:
spec:
chart: ingress-nginx
sourceRef:
kind: HelmRepository
name: ingress-nginx
namespace: unstable
version: 4.0.16
here is how i solved the issue for the moment:
.well-known
ingress which was created by cert-manager
and added IngressClassName: nginx-external
into the .spec
section of the cm-*
ingress - save.... and et voila the 404 changed to a 200. its a temp fix but at least i could create the cert for the moment. just wanted to share my finding.
In my case I had a duplicated ingress for foo.it
which was overlapping with the one created by cert-manager
This my ingress excerpt
//...
spec:
ingressClassName: nginx
rules:
- host: foo.it // <-- remove
- host: www.foo.it
tls:
- hosts:
- foo.it // <-- remove
- www.foo.it
secretName: foo-tls
If the issuer http01 class is istio, the istio ingressClass resource is required.
Ignressclass yaml example
apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: name: istio namespace: istio-system spec: controller: istio.io/ingress-controller
Could you please elaborate on that? I have created this resource, started http01 verification, but the requests are still routed to the virtual service instead of the cert-manager service. I have created both ingressClassName
and annotation
manually, but no luck to get it passed.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to jetstack.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to jetstack.
/lifecycle rotten
/remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
Send feedback to jetstack.
/close
@jetstack-bot: Closing this issue.
@sureshkachwa did you try a different version of cert-manager ? Before reloading the nginx-controller, I downgraded to the version 1.5.0. It still did not work after recreating the issuer and the ingress object. Also there are some changes I made to the Ingress that may have helped solving the issue. Still, only reloading NGINX in the ingress triggered the success of issuing the certificates.
metadata: name: nginx-ingress annotations: kubernetes.io/ingress.allow-http: "true" # I added this kubernetes.io/ingress.class: nginx # I added this cert-manager.io/issuer: letsencrypt-prod acme.cert-manager.io/http01-edit-in-place: "true" kubernetes.io/tls-acme: "true" spec: #ingressClassName: nginx # I commented this
I removed the ingressClassName field in spec
@jelel-fliss , we are using helm to install ingress controller ,ingress controller is getting deployed with "webhook validation error" moreover I installed cert-manager 1.6.0 and nginx controller 4.0.8 but still the same issue, challenge is still pending,there is something that we need to work on, I'll see if I get a solution and share it here.
It worked for me, while we have clusterIssuer nginx. Thanks a lot!!
**I am using Kubernetes 1.22 provided by Scaleway ( Kapsule ) https://www.scaleway.com/fr/kubernetes-kapsule/ and CertManager v1.6.1 and for consecutive days I have been trying to generate SSL certificates with Let's Encrypt, but the http01 challenge gets always stuck at 'pending' status with the error 404. After going to the CertManager documentation (https://cert-manager.io/docs/faq/acme/#got-404-status-code), i made sure that the domain is working and accessible thourgh the internet, I typed the path storek8s.igesa.it//.well-known/acme-challenge/ and I got a response from my browser, with the thumbprint code. Also the ACME solver pod is running smoothly.
This may help but when I curl the acme-challenge path, I get an empty response ( still with 200 status code with no error ), unlike the browser.
These are the issuer and the ingress configuration :
Ingress
Issuer
Cert Manager pods running in the cert-manager namespace
Logs of the CertManager pod :
Description of the certificate resource generated by CertManager :
Description of the challenge that keeps failing with the 404 status
Description of the Ingress resource.
Making sure that the acme http solver pod is running :
It looks like the ACME http solver pod is not reachable as it's stuck in this one log :
Expected behaviour: CertManager generating SSL certificates and enabling HTTPS communication with my website.
Steps to reproduce the bug:
Anything else we need to know?: I tried deleting and installing CertManager, modifying the annotations of the ingress resource, going through different forums but despite this being a bug encountered often, it lacks troubleshooting clear details and steps.
Environment details::
/kind bug