Skanda Bhatt
Skanda Bhatt

Reputation: 159

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!

Upvotes: 15

Views: 41008

Answers (7)

ilForna
ilForna

Reputation: 51

Had same error message. I solved the problem using helm lint on the folder of a dependecy charts that I just added. That pointed me to some bad assignment of values. Beware: helm lint on the parent folder didn't highlight any problem in the dependencies folders.

Upvotes: 2

LinuxUser
LinuxUser

Reputation: 663

Most likely, one of the deployments you removed left behind a clusterole.

Check if you have one with kubectl get clusterole

Once you find it, you can delete it with kubectl delete clusterrole <clusterrolename>

Upvotes: 0

GPuri
GPuri

Reputation: 823

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.

Upvotes: 0

Venkat
Venkat

Reputation: 273

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

Upvotes: 0

Jon&#225;š Kowalczyk
Jon&#225;š Kowalczyk

Reputation: 96

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 }}

Upvotes: 1

Arsen
Arsen

Reputation: 579

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

Upvotes: 11

avinashjha
avinashjha

Reputation: 630

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.

Upvotes: 0

Related Questions