2

I'm in the learning phase of Helm. I'm trying to create helm chart with simple pod definition file. But it's failed with the below error.

Note : If i'm trying to run this command helm install --values=ghost-values.yaml stable/ghost --generate-name. It works fine. Basically this download and install the chart from remote(If i'm not wrong). But I don't know why my local helm chart that I created not working.

➜  Helm $ helm version --short
v3.2.0+ge11b7ce
➜  Helm $

Folder path ->

➜  Helm $ ls guestbook
Chart.yml templates
➜  Helm $

Chart.yml file

➜  guestbook $ cat Chart.yml
apiVersion: v2
name: guestbook
appVersion: "1.0"
description: A Helm chart for Guestbook 1.0
version: 0.1.0
type: application
➜  guestbook $

template file

➜  guestbook $ cat templates/web.yml
apiVersion: apps/v1
kind: Deployment
metadata:
  creationTimestamp: null
  labels:
    run: pod
  name: pod
spec:
  replicas: 1
  selector:
    matchLabels:
      run: pod
  strategy: {}
  template:
    metadata:
      creationTimestamp: null
      labels:
        run: pod
    spec:
      containers:
      - args:
        - webserver
        image: nginx
        name: pod
        resources: {}
status: {}
➜  guestbook $

Error:

➜  Helm $ helm install demo-guestbook guestbook
Error: validation: chart.metadata is required
➜  Helm $
KMG
  • 889
  • 2
  • 14
  • 36

1 Answers1

8

Rename Chart.yml to Chart.yaml, then run again. Here it expects the name should be Chart.yaml

hoque
  • 5,735
  • 1
  • 19
  • 29
  • My Chart filename was already called `Chart.yaml` so I created a symlink from `chart.yaml` to `Chart.yaml` and re-ran the `helm install` command and it worked . This (to me) makes no sense based on looking at the link/script which uses `Chart.yaml` – PatS Feb 09 '23 at 23:00