How to solve Error: validation: chart.metadata is required on Mac using microk8s

4/30/2020

I have installed microk8s on Mac. I want to deploy an application using helm3 but it complains that Error: validation: chart.metadata is required. I am running this in the same directory as Chart.yaml as shown below.

gluu git:(4.1)ls 
Chart.yaml  charts      templates   values.yaml

Here is the command

➜  gluu git:(4.1) ✗ helm3 install zz .   
Error: validation: chart.metadata is required
An error occurred when trying to execute 'sudo microk8s.helm3 install zz .' with 'multipass': returned exit code 1.

I am aliases for microk8s commands. Both Helm3 and kubectl

What could be the issue?

-- Shammir
kubectl
kubernetes-helm
microk8s
multipass

1 Answer

4/30/2020

I managed to solve this by running this command. multipass exec MicroK8sVM -- sudo /snap/bin/microk8s.config > $HOME/.kube/config

The problem was, microk8s helm3 install was looking for the Chart.yaml in the vm created by multipass.

-- Shammir
Source: StackOverflow