gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-03 13:57:01 24 4
gpt4 key购买 nike

我想自动使用证书,该证书由 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com