<p>For me the problem here was spelling, believe it or not. I just had to lowercase the <code>release</code> name in the chart. I figured this out, by dumping my helm to a yaml using <code>helm template</code> and then applying that. When I did this is what I got</p>
<blockquote>
<p>Error from server (Invalid): error when creating &quot;nginx-ingress-install.yaml&quot;: ServiceAccount &quot;release-name-FooBar&quot; is invalid: metadata.name: Invalid value: &quot;release-name-FooBar&quot;: a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)*')</p>
</blockquote>
<p>I just had to change my release from <code>FooBar</code> to <code>foobar</code></p>

CC BY-SA 4.0
2023-04-24T05:22:07.913Z
2023-04-24T05:22:07.913Z
Evan Carroll
<p>Whenever I run <code>helm install</code> on the chart I'm making I see this,</p>
<blockquote>
<p>Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: IngressClass &quot;nginx&quot; in namespace &quot;&quot; exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key &quot;meta.helm.sh/release-name&quot; must equal &quot;acme-1681486075&quot;: current value is &quot;acmecorp-nginx&quot;; annotation validation error: key &quot;meta.helm.sh/release-namespace&quot; must equal &quot;acme&quot;: current value is &quot;default&quot;</p>
</blockquote>
<p>What concerns me here is this part</p>
<blockquote>
<p>Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: IngressClass &quot;nginx&quot; in namespace &quot;&quot; exists and <strong>cannot be imported into the current release</strong></p>
</blockquote>
<p>I don't want to import the cluster default. I want to create and bring my own ingress controller with my helm chart. Why is it still thinking this is a default to be imported?</p>
<pre><code>dependencies:
  ...
  - name: &quot;ingress-nginx&quot;
    repository: https://kubernetes.github.io/ingress-nginx
    version: 4.x.x
controller:
  electionID: ingress-controller-leader
  ingressClassResource:
    name: internal-nginx  # default: nginx
    enabled: true
    default: false
    controllerValue: &quot;k8s.io/internal-ingress-nginx&quot;  # default: k8s.io/ingress-nginx
</code></pre>
<p>What is the syntax in a Chart.yaml to list ingress-nginx as a dependency for a multiple ingress install?</p>

<kubernetes><helm><ingress><ingress-nginx>
How can I tell my Helm Chart to ignore the default ingress-nginx and create a new one?
Evan Carroll
# How can I tell my Helm Chart to ignore the default ingress-nginx and create a new one?

(Asked by: username_0 on 2023-04-14)

Whenever I run helm install on the chart I'm making I see this,

Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: IngressClass "nginx" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-name" must equal "acme-1681486075": current value is "acmecorp-nginx"; annotation validation error: key "meta.helm.sh/release-namespace" must equal "acme": current value is "default"

What concerns me here is this part

Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: IngressClass "nginx" in namespace "" exists and cannot be imported into the current release

I don't want to import the cluster default. I want to create and bring my own ingress controller with my helm chart. Why is it still thinking this is a default to be imported?
dependencies:
  ...
  - name: "ingress-nginx"
    repository: https://kubernetes.github.io/ingress-nginx
    version: 4.x.x
controller:
  electionID: ingress-controller-leader
  ingressClassResource:
    name: internal-nginx  # default: nginx
    enabled: true
    default: false
    controllerValue: "k8s.io/internal-ingress-nginx"  # default: k8s.io/ingress-nginx

What is the syntax in a Chart.yaml to list ingress-nginx as a dependency for a multiple ingress install?

**Tags:** kubernetes, helm, ingress, ingress-nginx


---

## 1 answers

### Answer by username_0 on 2023-04-24. Score: 0 | Accepted answer

For me the problem here was spelling, believe it or not. I just had to lowercase the `release` name in the chart. I figured this out, by dumping my helm to a yaml using `helm template` and then applying that. When I did this is what I got

> Error from server (Invalid): error when creating "nginx-ingress-install.yaml": ServiceAccount "release-name-FooBar" is invalid: metadata.name: Invalid value: "release-name-FooBar": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)\*')

I just had to change my release from `FooBar` to `foobar`


---

