I'm trying to issue a TLS certificate using Cert-Manager and Cilium Gateway (Gateway API). Everything works great when I use a self-signed ClusterIssuer, but fails when I move to the let's encrypt.
Cert-manager creates the http solvers, but I can see an error in the challenger:
Waiting for HTTP-01 challenge propagation: wrong status code '404', expected '200'
Here's my issuer:
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt
spec:
acme:
email: me@example.com
server: https://acme-staging-v02.api.letsencrypt.org/directory
privateKeySecretRef:
name: letsencrypt-private-key
solvers:
- http01:
gatewayHTTPRoute:
parentRefs:
- name: gateway
namespace: default
kind: Gateway
Gateway:
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: gateway
namespace: default
annotations:
cert-manager.io/cluster-issuer: letsencrypt
spec:
gatewayClassName: cilium
listeners:
- name: http
protocol: HTTP
port: 80
allowedRoutes:
namespaces:
from: All
- name: https-landing
protocol: HTTPS
port: 443
hostname: www.mypage.com
allowedRoutes:
namespaces:
from: All
tls:
mode: Terminate
certificateRefs:
- kind: Secret
group: ""
name: landing-tls
HTTPRoute:
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: https-landing
namespace: default
spec:
parentRefs:
- name: gateway
sectionName: https-landing
hostnames:
- www.mypage.com
rules:
- backendRefs:
- name: landing
port: 8000
Do you have any idea what can be wrong?
Try below troubleshooting steps, which may help to resolve your issue: