我想用letsencrypt创建一个证书。
当我运行这个 yml
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: grafana-tls
namespace: grafana
type: "kubernetes.io/tls"
spec:
secretName: grafana-tls
issuerRef:
name: letsencrypt-prod
dnsNames:
- mydomain.com
和kubectl apply -f .\grafana-tls.yml --validate=false
我遇到了以下错误
未找到引用的“颁发者”:未找到 issuer.cert-manager.io “letsencrypt-prod”
但是当我执行时kubectl get clusterissuer
,我遇到了这个结果
姓名准备年龄
letencrypt-prod True 3d22h
为了部署集群发行者,我使用了这个配置
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
namespace: ingress-basic
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: myEmail
privateKeySecretRef:
name: letsencrypt-prod
solvers:
- http01:
ingress:
class: nginx