'Rendered manifests contain a resource that already exists. Could not get information about the resource: resource name may not be empty

I Installed Helm 3 on my windows laptop where i have kube config configured as well. But when i try to install my local helm chart, i;m getting the below error.

Error: rendered manifests contain a resource that already exists. Unable to continue with install: could not get information about the resource: resource name may not be empty

I tried helm ls --all --all-namespaces but i don't see anything. Please help me!



Solution 1:[1]

I think you have to check if you left off any resource without - name:

Solution 2:[2]

I had the same issue. In values.yaml I had

name:

and in deployment.yaml I tried to access this "name" via {{ .Values.name }}. I found out, that {{ .Values.name }} doesn't work for me at all. I had to use {{ Chart.Name }} in deployment.yaml as the built-in object. ref: https://helm.sh/docs/chart_template_guide/builtin_objects/

If you want to access the "name", you can put it into values.yaml for example like this:

something: name:

and them access it from deployment.yaml (for example) like {{ .Values.something.name }}

Solution 3:[3]

I suppose there is already the same resource existing in your namespace where you are trying to install or in your helm chart you are trying to create the same resource twice.
Try to create a new namespace and try helm install if you still face the issue then definitely there is some issue with your helm install.

Solution 4:[4]

I faced the same error, the fix was to correct the sub-chart name in values.yaml file of main chart.

Solution 5:[5]

Best bet would be to run helm template . in the chart directory and verify that name or namespace fields are not empty. This was the case with me atleast.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Arsen
Solution 2 Dharman
Solution 3 Avinash Jha
Solution 4 Venkat
Solution 5 GPuri