Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: validation: chart.metadata is required when using helm install Traefik

I am now install Traefik using helm(version.BuildInfo{Version:"v3.0.2", GitCommit:"19e47ee3283ae98139d98460de796c1be1e3975f", GitTreeState:"clean", GoVersion:"go1.13.5"}),follow this doc:

git clone https://github.com/containous/traefik-helm-chart
helm install ./traefik-helm-chart

give me this error:

Error: must either provide a name or specify --generate-name

and I am using command like this:

helm install ./traefik-helm-chart --generate-name

and give this tips:

Error: validation: chart.metadata is required

what should I do to fix this?

like image 894
Dolphin Avatar asked Jan 28 '20 14:01

Dolphin


People also ask

What is metadata in Helm chart?

Metadata. As mentioned earlier, a Helm chart consists of metadata that is used to help describe what the application is, define constraints on the minimum required Kubernetes and/or Helm version and manage the version of your chart. All of this metadata lives in the Chart. yaml file.

What is a helm chart?

Helm uses a packaging format called Charts. A Helm Chart is a collection of files that describe a set of Kubernetes resources. Like other package manager formats based on convention, Helm Charts follow a directory structure/tree. The Helm Charts can be archived and sent to a Helm Chart Repository.


2 Answers

For anyone else getting to this page by googling the error message (like I did).

I received this same error because my custom chart file was called "chart.yaml" instead of "Chart.yaml" (note the uppercase C)

like image 119
Joon Avatar answered Sep 20 '22 01:09

Joon


You need to give the exact path where the Chart.yaml file is located

helm2

helm install --name <release-name> <chart-path>
(e.g., helm install --name prometheus ./prometheus/)

helm3

helm3 install <release-name> <chart-path>
(e.g., helm3 install prometheus .)

helm3 install --generate-name <chart-path>
like image 29
Prashanth Sams Avatar answered Sep 21 '22 01:09

Prashanth Sams