【问题标题】:How can I understand and resolve helm chart errors?如何理解和解决舵图错误?
【发布时间】:2021-10-18 21:35:36
【问题描述】:

我在尝试安装 rasa x helm chart 时收到以下错误消息:

Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Ingress" in version "extensions/v1beta1

有谁能帮我理解这个错误信息吗?

这些是我在终端中使用的命令:

helm repo add rasa-x https://rasahq.github.io/rasa-x-helm

kubectl create namespace my-namespace

helm --namespace my-namespace install --values values.yml my-release rasa-x/rasa-x

在我的 values.yaml 中有:

nginx:
  service:
    # connect LoadBalancer directly to VMs' internal IP
    # You get this value with: $ hostname -I
    externalIPs: [10.164.0.2]

【问题讨论】:

    标签: kubernetes-helm rasa rasa-x


    【解决方案1】:

    您正在使用的图表尝试使用不久前弃用且不再被识别的 API 版本创建 Ingress 对象。

    问题来自那里:https://github.com/RasaHQ/rasa-x-helm/blob/main/charts/rasa-x/templates/ingress.yaml#L4-L10

    由于某种原因,Helm 没有检测到正确的 API 版本 (.Capabilities.KubeVersion.Version)。尽管在其他图表上工作过,但发现能力并不是 100% 可靠的——例如。使用 ArgoCD。

    作为一种解决方法,您可以尝试将对象生成到文件中:

    helm --dry-run [your-options] >my-rendered-chart.yaml
    sed -i 's|extensions/v1beta1|networking.k8s.io/v1|' my-rendered-chart.yaml
    kubectl apply -f my-rendered-chart.yaml
    

    虽然这有点违背 Helm 的目的。最好找出一个修复并贡献它。

    要处理图表,您可以在本地提取它,使用。

    helm repo add rasahq  https://rasahq.github.io/rasa-x-helm 
    helm fetch rasahq/rasa-x --untar
    ls rasa-x/
    

    然后您可以处理补丁,测试您的更改:

    helm install --dry-run --debug ./my-chart
    helm install --dry-run --debug ./my-chart | kubectl apply -f-
    ...
    

    【讨论】:

    • 谢谢@SYN!我要试试你的解决方案!
    • 我做了helm fetch https://rasahq.github.io/rasa-x-helm --untar,然后我得到了my-rendered-chart.yaml。唯一的问题是 my-rendered-chart.yaml 是一个空的 .yaml 文件。还是应该是空的?
    • 我已经用该图表的命令更新了我的答案。基本上:您不应该获取 URL。只需使用您将传递给 helm install 的名称
    • 谢谢!有效。我要调试了。
    猜你喜欢
    • 2021-12-28
    • 2017-10-06
    • 2020-12-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-10
    • 1970-01-01
    相关资源
    最近更新 更多