Issuers(和ClusterIssuers)代表可以从中获取签名的 x509 证书的证书颁发机构,例如Let’s Encrypt。您至少需要一个 Issuer 或 ClusterIssuer 才能开始在您的集群中颁发证书。

    发行者类型的一个示例是 ACME。一个简单的 ACME 发行者可以定义为:

    1. apiVersion: cert-manager.io/v1alpha2
    2. kind: Issuer
    3. metadata:
    4. name: letsencrypt-prod
    5. namespace: edge-services
    6. spec:
    7. acme:
    8. # The ACME server URL
    9. server: https://acme-v02.api.letsencrypt.org/directory
    10. # Email address used for ACME registration
    11. email: user@example.com
    12. # Name of a secret used to store the ACME account private key
    13. privateKeySecretRef:
    14. name: letsencrypt-prod
    15. solvers:
    16. # An empty 'selector' means that this solver matches all domains
    17. - selector: {}
    18. http01:
    19. ingress:
    20. class: nginx

    这是最简单的 ACME 颁发者 - 它不指定 DNS-01 质询提供者。HTTP-01 验证可以通过启用 HTTP-01 质询机制(带 字段)使用 Ingress 资源来执行。

    命名空间
    Issuers是一个命名空间资源,不能从不同命名空间中的颁发者颁发证书。这意味着您需要在每个想要获取证书的命名空间中创建一个颁发者。

    如果您想创建一个可以在多个命名空间中使用的发行者,您应该考虑创建一个ClusterIssuer 资源。这几乎与颁发者资源相同,但它是非命名空间的,因此它可用于跨所有命名空间颁发证书。