Issuers(和ClusterIssuers)代表可以从中获取签名的 x509 证书的证书颁发机构,例如Let’s Encrypt。您至少需要一个 Issuer 或 ClusterIssuer 才能开始在您的集群中颁发证书。
发行者类型的一个示例是 ACME。一个简单的 ACME 发行者可以定义为:
apiVersion: cert-manager.io/v1alpha2
kind: Issuer
metadata:
name: letsencrypt-prod
namespace: edge-services
spec:
acme:
# The ACME server URL
server: https://acme-v02.api.letsencrypt.org/directory
# Email address used for ACME registration
email: user@example.com
# Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: letsencrypt-prod
solvers:
# An empty 'selector' means that this solver matches all domains
- selector: {}
http01:
ingress:
class: nginx
这是最简单的 ACME 颁发者 - 它不指定 DNS-01 质询提供者。HTTP-01 验证可以通过启用 HTTP-01 质询机制(带 字段)使用 Ingress 资源来执行。
命名空间
Issuers是一个命名空间资源,不能从不同命名空间中的颁发者颁发证书。这意味着您需要在每个想要获取证书的命名空间中创建一个颁发者。
如果您想创建一个可以在多个命名空间中使用的发行者,您应该考虑创建一个ClusterIssuer 资源。这几乎与颁发者资源相同,但它是非命名空间的,因此它可用于跨所有命名空间颁发证书。