3

使用cert-manager为DNSPod的域名签发免费证书

 1 year ago
source link: https://www.bboy.app/2023/08/01/%E4%BD%BF%E7%94%A8cert-manager%E4%B8%BAdnspod%E7%9A%84%E5%9F%9F%E5%90%8D%E7%AD%BE%E5%8F%91%E5%85%8D%E8%B4%B9%E8%AF%81%E4%B9%A6/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

使用cert-manager为DNSPod的域名签发免费证书

August 1, 2023 本文有 410 个字 需要花费 1 分钟阅读
20230801-1.webp

详细的可以看

https://cloud.tencent.com/document/product/457/60225

其实就是多安装了cert-manager-webhook-dnspod

不懂cert-manager的可以看

使用cert-manager管理你k8s的证书

首先部署cert-manager

kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.0/cert-manager.yaml

https://github.com/qqshfox/cert-manager-webhook-dnspod

cd deploy/cert-manager-webhook-dnspod/

修改values.yaml最主要是下面这些参数,记得看注释

groupName: acme.xxx.com # 推荐直接使用你的域名

certManager:
  namespace: cert-manager
  serviceAccountName: cert-manager

# 记住创建的是dnspod token 不是腾讯云 api 密钥
secrets:
 apiID:  xxxx
 apiToken: xxxxxx


clusterIssuer:
  enabled: true # 如果配置为 true 会自动创建一个clusterIssuer
  staging: false
  email: [email protected] # 你的邮箱

helm upgrade --install -n cert-manager -f values.yaml cert-manager-webhook-dnspod .

最后就是创建证书测试下

kind: Certificate
metadata:
  name: xxxx-xxxx-com # 推荐直接使用域名
  namespace: default
spec:
  secretName: xxxx-xxxx-com-secret # 证书保存在这个 secret 中推荐直接使用域名
  issuerRef:
    name: cert-manager-webhook-dnspod-cluster-issuer # 这里使用自动生成出来的 ClusterIssuer
    kind: ClusterIssuer
    group: cert-manager.io
  dnsNames: # 填入需要签发证书的域名列表,确保域名是使用 dnspod 管理的
  - xxxx.xxxx.com

如果碰到问题了,直接去看cert-manager pod 的日志,一般碰到的就是因为网络问题导致的不能签发证书

欢迎关注我的博客www.bboy.app

Have Fun


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK