【问题标题】:microk8s - helm3 / function "lookup" not definedmicrok8s - helm3 /函数“查找”未定义
【发布时间】:2021-05-07 19:46:00
【问题描述】:

我最近安装了microk8s,并在 microk8s 上启用了 helm3 和 dns 插件。 从stable/chart 进行部署工作正常,但从bitnami/chart 进行的任何部署都会失败。

操作系统: Ubuntu 20.04.1 LTS -- microk8s:1.19/stable

microk8s.helm3 install my-release bitnami/jenkins
=> Error: parse error at (jenkins/charts/common/templates/_secrets.tpl:84): function "lookup" not defined

microk8s.helm3 install my-release bitnami/magento
=> Error: parse error at (magento/charts/elasticsearch/charts/common/templates/_secrets.tpl:84): function "lookup" not defined

【问题讨论】:

  • 你的 Helm 版本是什么?
  • 嗨,我正在使用 helm 作为 microk8s 的插件。 sudo microk8s helm3 version =>version.BuildInfo{Version:"v3.0.2", GitCommit:"19e47ee3283ae98139d98460de796c1be1e3975f", GitTreeState:"clean", GoVersion:"go1.13.5"} so my helm version is 3.0.2

标签: kubernetes kubernetes-helm microk8s


【解决方案1】:

报告了 herehere 的错误,这是由于将 lookup 条件包含到函数映射中引起的。

已合并 here 的修复程序,现在可从 Helm 版本 3.2.0 获得。

因此,为了解决此问题,您应该将 Helm 更新到 3.2.0 或更高版本。

【讨论】:

    【解决方案2】:

    在安装 Kafka 时遇到了同样的问题。解决方案是安装较新版本的 Helm 3 并使用指定 --kubeconfig 的命令:

    microk8s config > kubeconfig.yaml
    sudo snap install helm --classic
    /snap/bin/helm repo add bitnami https://charts.bitnami.com/bitnami
    /snap/bin/helm install --wait kafka bitnami/kafka --set metrics.jmx.enabled=true --kubeconfig kubeconfig.yaml
    

    【讨论】:

      【解决方案3】:

      尝试用 snap 安装 helm3,然后链接到 microk8s:

      sudo snap install helm --classic
      sudo mkdir /var/snap/microk8s/current/bin
      sudo ln -s /snap/bin/helm /var/snap/microk8s/current/bin/helm
      

      使用 helm3.0 而不是 helm 3.1 似乎存在一些问题

      【讨论】:

      【解决方案4】:

      感谢您提供的所有信息

      我在 ubuntu 上使用 snap helm(版本 3.6.3)解决了这个问题

      microk8s config > ~/.kube/config
      chmod go-r ~/.kube/config
      sudo snap install helm --classic
      

      然后执行 helm repo 添加、更新和安装图表而不会出错

      【讨论】:

        猜你喜欢
        • 2020-09-29
        • 2021-07-22
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-06-21
        • 1970-01-01
        相关资源
        最近更新 更多