通过 cert-manager 使用 Let's 加密为 CA 进行每次证书更新时的 JKS 创建

发布于 2025-01-16 08:24:56 字数 247 浏览 0 评论 0原文

我们有一个报告应用程序,需要从公共证书和与证书关联的私钥创建 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

玩物 2025-01-23 08:24:56

从评论中发布答案。


经过一些评论,主要问题缩小为:

“如何使用 CertManager 手动续订证书?”


回答本身:

有一个 CLI 工具用于CertManager 称为 cmctl

它通过发出以下命令支持手动续订证书

cmctl renew $CERT_NAME

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 called cmctl.

And it supports manual renewal of certificates by issuing following command:

cmctl renew $CERT_NAME
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文