<p>I have installed microk8s, traefik and cert-manager. When I try to receive a letsencrypt certificate, a new pod for answering the challenge is created, but the request from the letsencryt server does not reach this pod. Instead, the request is forwarded to the pod that serves the website.</p>
<p>It looks like the ingressroute routing the traffic to the web pod has higher priority then the ingress that routes the <code>/.well-known/acme-challenge/...</code> requests to the correct pod. What am I missing?</p>
<p><code>kubectl edit clusterissuer letsencrypt-prod</code>:</p>
<pre><code>kind: ClusterIssuer
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {&quot;apiVersion&quot;:&quot;cert-manager.io/v1&quot;,&quot;kind&quot;:&quot;ClusterIssuer&quot;,&quot;metadata&quot;:{&quot;annotations&quot;:{},&quot;name&quot;:&quot;letsencrypt-prod&quot;},&quot;spec&quot;:{&quot;acme&quot;:{&quot;email&quot;:&quot;office@mydomain.com&quot;,&quot;privateKeySecretRef&quot;:{&quot;name&quot;:&quot;letsencrypt-prod&quot;},&quot;server&quot;:&quot;https://acme-v02.api.letsencrypt.org/directory&quot;,&quot;solvers&quot;:[{&quot;http01&quot;:{&quot;ingress&quot;:{&quot;class&quot;:&quot;traefik&quot;}}}]}}}
  creationTimestamp: &quot;2022-07-11T14:32:15Z&quot;
  generation: 11
  name: letsencrypt-prod
  resourceVersion: &quot;49979842&quot;
  uid: 40c4e26d-9c94-4cda-aa3a-357491bdb25a
spec:
  acme:
    email: office@mydomain.com
    preferredChain: &quot;&quot;
    privateKeySecretRef:
      name: letsencrypt-prod
    server: https://acme-v02.api.letsencrypt.org/directory
    solvers:
    - http01:
        ingress: {}
status:
  acme:
    lastRegisteredEmail: office@mydomain.com
    uri: https://acme-v02.api.letsencrypt.org/acme/acct/627190636
  conditions:
  - lastTransitionTime: &quot;2022-07-11T14:32:17Z&quot;
    message: The ACME account was registered with the ACME server
    observedGeneration: 11
    reason: ACMEAccountRegistered
    status: &quot;True&quot;
    type: Ready
</code></pre>
<p><code>kubectl edit ingressroute webspace1-tls</code>:</p>
<pre><code>apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {&quot;apiVersion&quot;:&quot;traefik.containo.us/v1alpha1&quot;,&quot;kind&quot;:&quot;IngressRoute&quot;,&quot;metadata&quot;:{&quot;annotations&quot;:{},&quot;name&quot;:&quot;w271a19-tls&quot;,&quot;namespace&quot;:&quot;default&quot;},&quot;spec&quot;:{&quot;entryPoints&quot;:[&quot;websecure&quot;],&quot;routes&quot;:[{&quot;kind&quot;:&quot;Rule&quot;,&quot;match&quot;:&quot;Host(`test1.mydomain.com`)&quot;,&quot;middlewares&quot;:[{&quot;name&quot;:&quot;test-compress&quot;}],&quot;priority&quot;:10,&quot;services&quot;:[{&quot;name&quot;:&quot;w271a19&quot;,&quot;port&quot;:80}]}],&quot;tls&quot;:{&quot;secretName&quot;:&quot;test1.mydomain.com-tls&quot;}}}
  creationTimestamp: &quot;2022-10-05T20:01:38Z&quot;
  generation: 7
  name: w271a19-tls
  namespace: default
  resourceVersion: &quot;45151920&quot;
  uid: 77e9b7ac-33e7-4810-9baf-579f00e2db6b
spec:
  entryPoints:
  - websecure
  routes:
  - kind: Rule
    match: Host(`test1.mydomain.com`)
    middlewares:
    - name: test-compress
    priority: 10
    services:
    - name: w271a19
      port: 80
  tls:
    secretName: test1.mydomain.com-tls
</code></pre>
<p><code>kubectl edit ingress cm-acme-http-solver-rz9mm</code>:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/whitelist-source-range: 0.0.0.0/0,::/0
  creationTimestamp: &quot;2023-03-22T13:00:18Z&quot;
  generateName: cm-acme-http-solver-
  generation: 1
  labels:
    acme.cert-manager.io/http-domain: &quot;2306410973&quot;
    acme.cert-manager.io/http-token: &quot;1038683769&quot;
    acme.cert-manager.io/http01-solver: &quot;true&quot;
  name: cm-acme-http-solver-rz9mm
  namespace: default
  ownerReferences:
  - apiVersion: acme.cert-manager.io/v1
    blockOwnerDeletion: true
    controller: true
    kind: Challenge
    name: test1.mydomain.com-glnrn-2096762198-4162956557
    uid: db8b5c78-8549-4f13-b43d-c6c7bba7468d
  resourceVersion: &quot;52806119&quot;
  uid: 6b27e02a-ee65-4809-b391-95c03f9ebb36
spec:
  ingressClassName: traefik
  rules:
  - host: test1.mydomain.com
    http:
      paths:
      - backend:
          service:
            name: cm-acme-http-solver-ll2zr
            port:
              number: 8089
        path: /.well-known/acme-challenge/9qtVY8FjfMIWd_wBNhP3PEPJZo4lFTw8WfWLMucRqAQ
        pathType: ImplementationSpecific
status:
  loadBalancer: {}
</code></pre>
<p><code>get_cert.yaml</code>:</p>
<pre><code>apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: test1.mydomain.com
  namespace: default
spec:
  secretName: test1.mydomain.com-tls
  issuerRef:
    name: letsencrypt-prod
    kind: ClusterIssuer
  commonName: test1.mydomain.com
  dnsNames:
  - test1.mydomain.com
</code></pre>
<p>In the webserver log of the web pod I see the reqests to /.well-known... coming in.</p>

<p>Shouldn't this annotation be added to ingress?</p>
<pre><code>cert-manager.io/cluster-issuer=letsencrypt-production
</code></pre>
