4

I recently installed microk8s, and enabled helm3 and dns addons on microk8s. Deployment from stable/chart works fine but any deployment from bitnami/chart fails.

OS: 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
Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286
gharbi.bdr
  • 147
  • 2
  • 9
  • What is your Helm version? – Wytrzymały Wiktor Feb 04 '21 at 11:56
  • Hi, i'm using the helm as an addon of 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` – gharbi.bdr Feb 04 '21 at 16:00

4 Answers4

9

There was a bug reported here and here which was caused by the conditional inclusion of lookup into the function map.

A fix for it was merged here and is now available from Helm version 3.2.0.

So, in order to fix this issue you should update your Helm to version 3.2.0 or newer.

Wytrzymały Wiktor
  • 11,492
  • 5
  • 29
  • 37
2

Faced with the same issue while installing Kafka. The solution is to install a newer version of Helm 3 and use its commands with --kubeconfig specified:

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
Sanchez
  • 51
  • 5
0

Try to install helm3 with snap and then link it to 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

There seems to be some issues using helm3.0 instead of helm 3.1

paltaa
  • 2,985
  • 13
  • 28
  • Hi, thx for your help. i got this error with your approach: Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused – gharbi.bdr Feb 04 '21 at 16:22
  • see my solution here: https://worklifenotes.com/2020/01/22/how-to-make-microk8s-work-with-helm/ – taleodor Feb 04 '21 at 16:52
0

thanks for all of the information

I fixed this by using the snap helm (version 3.6.3) on ubuntu

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

then doing the helm repo add, update, and install charts without errors

Alan
  • 61
  • 1
  • 4