Skip to content

404 on ACME challenge because of missing Ingress rules #3450

@hahahannes

Description

@hahahannes

Describe the bug
The created Ingress is not applied by the Controller. Therefore I get a 404 when I try to 'solve' the ACME challenge.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy NGINX ingress controller Version 2.4.1
    Helm installation with ingressClass: nginx

  2. Deploy cert-manager Version 1.11

  3. Setup an Issuer

apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
 name: letsencrypt-staging
spec:
 acme:
   server: https://acme-staging-v02.api.letsencrypt.org/directory
   privateKeySecretRef:
     name: letsencrypt-staging
   solvers:
   - http01:
       ingress:
         class:  nginx
  1. Create a Certificate resource (not an Ingress)
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: cert
spec:
  secretName: cert
  issuerRef:
    kind: ClusterIssuer
    name: letsencrypt-staging
  commonName: foo.bar
  dnsNames:
  - foo.bar

Expected behavior
An Ingress for ACME HTTP01 challenge should be created which should get picked up by the Controller.
The ACME URL should then be reachable.

Your environment

  • Version of the Ingress Controller: 2.4.1
  • Version of Kubernetes: 1.20
  • Kubernetes platform (e.g. Mini-kube or GCP): self hosted
  • Using NGINX or NGINX Plus: NGINX
  • Cert-Manager: 1.11

Additional context

  • Everything works fine when I use an Ingress resource with the cert-manager annotations.
  • I double checked the Ingress Class of the Issuer and the created Ingress to match the class specified in the NGINX controller configuration.
  • The Ingress has no Events to it when kubectl describe ingress is done.
  • The Controller seems to notice that an ingress is created
  • But It logs only: Using the DEPRECATED annotation 'kubernetes.io/ingress.class'. The 'ingressClassName' field will be ignored. A Normal/Error Event is missing.
    Detailed log with logLevel=3:


I0118 14:50:45.829372 1 handlers.go:197] Adding service: cm-acme-http-solver-n6w69
--
Wed, Jan 18 2023 3:50:45 pm | I0118 14:50:45.829418 1 task_queue.go:61] Adding an element with a key: default/cm-acme-http-solver-n6w69
Wed, Jan 18 2023 3:50:45 pm | I0118 14:50:45.829467 1 task_queue.go:94] Syncing default/cm-acme-http-solver-n6w69
Wed, Jan 18 2023 3:50:45 pm | I0118 14:50:45.829482 1 task_queue.go:73] The queue has 0 element(s)
Wed, Jan 18 2023 3:50:45 pm | I0118 14:50:45.829500 1 controller.go:882] Syncing default/cm-acme-http-solver-n6w69
Wed, Jan 18 2023 3:50:45 pm | I0118 14:50:45.829513 1 controller.go:2004] Syncing service default/cm-acme-http-solver-n6w69
Wed, Jan 18 2023 3:50:45 pm | I0118 14:50:45.838546 1 handlers.go:102] Adding Ingress: cm-acme-http-solver-4w2fv
Wed, Jan 18 2023 3:50:45 pm | I0118 14:50:45.838585 1 task_queue.go:61] Adding an element with a key: default/cm-acme-http-solver-4w2fv
Wed, Jan 18 2023 3:50:45 pm | I0118 14:50:45.838616 1 task_queue.go:94] Syncing default/cm-acme-http-solver-4w2fv
Wed, Jan 18 2023 3:50:45 pm | I0118 14:50:45.838630 1 task_queue.go:73] The queue has 0 element(s)
Wed, Jan 18 2023 3:50:45 pm | I0118 14:50:45.838654 1 controller.go:882] Syncing default/cm-acme-http-solver-4w2fv
Wed, Jan 18 2023 3:50:45 pm | I0118 14:50:45.838685 1 controller.go:1971] Adding or Updating Ingress: default/cm-acme-http-solver-4w2fv
Wed, Jan 18 2023 3:50:45 pm | W0118 14:50:45.838707 1 controller.go:3641] Using the DEPRECATED annotation 'kubernetes.io/ingress.class'. The 'ingressClassName' field will be ignored.
Wed, Jan 18 2023 3:50:45 pm | I0118 14:50:45.839115 1 controller.go:1227] Processing 0 changes
Wed, Jan 18 2023 3:50:45 pm | I0118 14:50:45.839135 1 controller.go:1187] Processing 0 problems
Wed, Jan 18 2023 3:50:45 pm | I0118 14:50:45.849809 1 handlers.go:68] Adding endpoints: cm-acme-http-solver-n6w69


Metadata

Metadata

Assignees

Labels

bugAn issue reporting a potential bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions