我遇到了一个很奇怪的问题,已经坚持了2天。我有一个运行nginx-ingress和cert-manager的kubernetes集群。通过HTTPS访问我的网站时,一切似乎都工作正常,但出现以下错误(在Chrome边缘):
NET::ERR_CERT_AUTHORITY_INVALID
如果我仍然继续,它将正常加载站点,但没有证书。
已正确颁发了证书,创建了秘密,任何地方都没有错误。
我的入口资源中有以下注释:
kubernetes.io/ingress.class: "nginx"
kubernetes.io/tls-acme: "true"
cert-manager.io/cluster-issuer: "letsencrypt-production"
ingress.kubernetes.io/ssl-redirect: "true"
我的集群发行人:
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-production
spec:
acme:
# The ACME production api URL
server: https://acme-staging-v02.api.letsencrypt.org/directory
# Email address used for ACME registration
email: *********
# Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: letsencrypt-production
# Enable the HTTP-01 challenge provider
solvers:
- http01:
ingress:
class: nginx
证书资源返回:
Normal Issuing 108s cert-manager The certificate has been successfully issued
我不是kubernetes的新手,所以让我知道我是否可以采取其他调试步骤。
答案 0 :(得分:3)
您正在使用不提供有效证书的acme登台server: https://acme-staging-v02.api.letsencrypt.org/directory
服务器。
要获得有效的证书,您必须使用acme生产服务器 server: https://acme-v02.api.letsencrypt.org/directory
。
你可以试试看。
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-production
spec:
acme:
# The ACME production api URL
server: https://acme-v02.api.letsencrypt.org/directory
# Email address used for ACME registration
email: *********
# Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: letsencrypt-production
# Enable the HTTP-01 challenge provider
solvers:
- http01:
ingress:
class: nginx