docker - Helm 图表使用来自证书管理器的 secret

标签 docker ssl kubernetes kubernetes-helm kubernetes-secrets

我想自动使用证书,该证书由 cert-manager 创建,如记录 here ,在 Helm 图表中。例如,下面的 YAML。

---
apiVersion: v1
kind: Pod
metadata:
  name: mypod
  labels:
    app: mypod
spec:
  containers:
    - name: mypod
      image: repo/image:0.0.0
      imagePullPolicy: Always
      volumeMounts:
        - name: certs
          mountPath: /etc/certs
          readOnly: true
      ports:
        - containerPort: 4443
          protocol: TCP
  volumes:
    - name: certs
      secret:
        secretName: as_created_by_cert-manager

如何提交 YAML 以从 cert-manager 获取 Certificate,然后将生成的 Secret 插入 Pod 上面的 YAML,在 Helm 图表中?

最佳答案

我应 OP 的要求将 David 的评论作为社区维基答案发布:

You should be able to write the YAML for the Certificate in the same chart, typically in its own file. I'd expect it would work to create them together, the generated Pod would show up as "Pending" in kubectl get pods output until cert-manager actually creates the matching Secret. – David Maze

关于docker - Helm 图表使用来自证书管理器的 secret ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59419775/

相关文章:

docker - Jenkins Docker 管道退出代码 -1

c# - Azure上托管的ASP .NET MVC项目可使用SSL身份验证连接到clearDB mySQL

javascript - NodeJs tls.createServer 等同于 Apache SSLCertificateChainFile?

node.js - 在 kubernetes 上使用主机作为 localhost 公开 Node js 应用程序

amazon-web-services - kubectl 错误 您必须登录到服务器(未经授权) - EKS 集群

python - 可以在基于 TensorFlow docker 镜像的 docker 容器中使用 python 3.5 吗?

docker - 来自kubernetes集群的apt更新给出错误Clearsigned文件无效,得到 'NOSPLIT'(网络需要身份验证吗?)

linux - 为什么在 docker 容器内运行的命令不能通过 docker run 从外部运行?

ssl - 如果我不使用 DocuSign 嵌入式签名,是否需要将证书安装到我的服务器中?

kubernetes - 自动重用包含数据的永久卷