通过 cert-manager 使用 Let's 加密为 CA 进行每次证书更新时的 JKS 创建
我们有一个报告应用程序,需要从公共证书和与证书关联的私钥创建 JKS 文件。
对于通过 Jenkins 进行的 K8S 部署,我们创建此应用程序,并在此应用程序部署期间 - pods、svc、ing、证书也会创建,一旦部署成功,我们调用另一个脚本来使用证书和私钥,创建 JKS 并复制它到应用程序可以拾取它的某个位置的 Pod。这效果很好,但我们如何自动创建 JKS,并在每次 Let's Encrypt 证书更新时将其复制到 Pod,因为证书每 90 天更新一次。
We have a reporting application which needs JKS file to be created from public certificate and private key associated with the certificate.
For our K8S deployment through Jenkins, we create this application and during this application deployment - pods, svc, ing, certificate also gets created and once our deployment is successful we call another script to use the certificate and private key, create a JKS and copy it to the pod in some location where application can pick it up. This works well but how do we automate this JKS creation and copy it to the pod with every let's encrypt certificate renewal since the certificate is renewed for every 90 days.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从评论中发布答案。
经过一些评论,主要问题缩小为:
“如何使用
CertManager
手动续订证书?”回答本身:
有一个 CLI 工具用于
CertManager
称为cmctl
。它通过发出以下命令支持手动续订证书:
Posting an answer from comments.
After some comments, main question was narrowed down to:
"How to renew certificate manually using
CertManager
?"Answer itself:
There's a CLI tool for
CertManager
which is calledcmctl
.And it supports manual renewal of certificates by issuing following command: