申请TLS证书
export DOMAIN="sumery.cn"
# 创建 Certificate 创建 证书cat > ${DOMAIN}-certificate.yaml <<EOFapiVersion: cert-manager.io/v1kind: Certificatemetadata: name: ${DOMAIN}spec: dnsNames: - ${DOMAIN} # 要签发证书的域名,替换成你自己的 issuerRef: kind: ClusterIssuer name: letsencrypt-dns01 # 引用 ClusterIssuer,名字和 letsencrypt-issuer.yaml 中保持一致 secretName: ${DOMAIN}-letsencrypt-tls # 最终签发出来的证书会保存在这个 Secret 里面EOFkubectl apply -f ${DOMAIN}-certificate.yaml
# 查看是否生效kubectl get certificate
# kubectl get certificate -w