gpt4 book ai didi

kubernetes - 无法从发布 list 构建 kubernetes 对象

转载 作者:行者123 更新时间:2023-12-02 12:01:16 28 4
gpt4 key购买 nike

我正在尝试如下部署港口:

helm install hub harbor/harbor \
--namespace prod \
--set expose.ingress.hosts.core=hub.service.example.io \
--set expose.ingress.annotations.'kubernetes\.io/ingress\.class'=contour \
--set expose.ingress.annotations.'cert-manager\.io/cluster-issuer'=letsencrypt-prod \
--set expose.ingress.annotations.'ingress\.kubernetes\.io/force-ssl-redirect'="true" \
--set expose.ingress.annotations.'kubernetes\.io/tls-acme'="true" \
--set externalURL=https://hub.service.example.io \
--set expose.tls.secretName=secret \
--set notary.enabled=false \
--set secretkey=secret \
--set harborAdminPassword=serect

我有:
Error: unable to build kubernetes objects from release manifest: unable to decode "": resource.metadataOnlyObject.ObjectMeta: v1.ObjectMeta.Annotations: ReadString: expects " or n, but found t, error found in #10 byte of ...|edirect":true,"ingre|..., bigger context ...|prod","ingress.kubernetes.io/force-ssl-redirect":true,"ingress.kubernetes.io/proxy-body-size":"0","i|...  

我究竟做错了什么?

最佳答案

该错误表明值"ingress.kubernetes.io/force-ssl-redirect":true不是字符串,它是像 "ingress.kubernetes.io/force-ssl-redirect":"true" 这样的字符串

您可以通过强制将 bool 注释值设置为字符串,使用 --set-string喜欢以下

helm install hub harbor/harbor \
--namespace prod \
--set expose.ingress.hosts.core=hub.service.example.io \
--set expose.ingress.annotations.'kubernetes\.io/ingress\.class'=contour \
--set expose.ingress.annotations.'cert-manager\.io/cluster-issuer'=letsencrypt-prod \
--set-string expose.ingress.annotations.'ingress\.kubernetes\.io/force-ssl-redirect'="true" \
--set-string expose.ingress.annotations.'kubernetes\.io/tls-acme'="true" \
--set externalURL=https://hub.service.example.io \
--set expose.tls.secretName=secret \
--set notary.enabled=false \
--set secretkey=secret \
--set harborAdminPassword=serect

关于kubernetes - 无法从发布 list 构建 kubernetes 对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61652643/

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