<p>Same TLS secret will not be mapped to two ingress at the same time within a namespace.It will map to the first deployed ingress. Create the same secret with a different name and map it to the other ingress for it to work.</p>

CC BY-SA 4.0
2021-06-08T09:34:40.093Z
Yes, that was the problem. It's up to bitnami to handle that. By not specifying the name of the tls secret it creates it with different names, so it worked.
user358448
CC BY-SA 4.0
2021-06-07T21:30:37.020Z
2021-06-07T21:30:37.020Z
rohatgisanat
<p>I'm using bitnami/wordpress helm chart to create many websites which should run on different domains. I'd like to auto secure them and use a single ingress to route traffic. I'm using this tutorial <a href="https://docs.bitnami.com/tutorials/secure-wordpress-kubernetes-managed-database-ssl-upgrades/" rel="nofollow noreferrer">https://docs.bitnami.com/tutorials/secure-wordpress-kubernetes-managed-database-ssl-upgrades/</a> to create ingress nginx controller + letsencrypt.</p>
<p>Routing works fine, but the ssl works only for the first created wordpress container/domain and those after it are not secured. I can't figure out why? k8s v1.19.10-gke.1600 helm 3.6.0</p>
<p>Let's say i have sub1.domain.com and sub2.domain.com and i have two  sub1.domain.com.values.yaml and sub2.domain.com.values.yamlfiles to customize bitnami/wordpress helm chart</p>
<p>Config is as follows:
sub1.domain.com.values.yaml:</p>
<pre><code>ingress:
  enabled: true
  certManager: true
  hostname: sub1.domain.com
  extraTls:
  - hosts:
      - sub1.domain.com
    secretName: wordpress.local-tls
  annotations:
      kubernetes.io/ingress.class: nginx
      cert-manager.io/cluster-issuer: letsencrypt-prod
</code></pre>
<p>sub2.domain.com.values.yaml:</p>
<pre><code>ingress:
  enabled: true
  certManager: true
  hostname: sub2.domain.com
  extraTls:
  - hosts:
      - sub2.domain.com
    secretName: wordpress.local-tls
  annotations:
      kubernetes.io/ingress.class: nginx
      cert-manager.io/cluster-issuer: letsencrypt-prod
</code></pre>
<p>I apply them with:</p>
<pre><code>helm install sub1 bitnami/wordpress -f sub1.domain.com.values.yaml
helm install sub2 bitnami/wordpress -f sub2.domain.com.values.yaml
</code></pre>
<p>Buth are accessible via browser, but only sub1.domain.com is with valid ssl cert, sub2 is with kubernetes fake cert.</p>
<p>What am i doing wrong?</p>

<docker><kubernetes><nginx><ingress><wordpress>
How to configure single nginx ingress with letsencrypt and multiple bitnami wordpress containers?
user358448
# How to configure single nginx ingress with letsencrypt and multiple bitnami wordpress containers?

(Asked by: username_0 on 2021-06-05)

I'm using bitnami/wordpress helm chart to create many websites which should run on different domains. I'd like to auto secure them and use a single ingress to route traffic. I'm using this tutorial https://docs.bitnami.com/tutorials/secure-wordpress-kubernetes-managed-database-ssl-upgrades/ to create ingress nginx controller + letsencrypt.
Routing works fine, but the ssl works only for the first created wordpress container/domain and those after it are not secured. I can't figure out why? k8s v1.19.10-gke.1600 helm 3.6.0
Let's say i have sub1.domain.com and sub2.domain.com and i have two  sub1.domain.com.values.yaml and sub2.domain.com.values.yamlfiles to customize bitnami/wordpress helm chart
Config is as follows:
sub1.domain.com.values.yaml:
ingress:
  enabled: true
  certManager: true
  hostname: sub1.domain.com
  extraTls:
  - hosts:
      - sub1.domain.com
    secretName: wordpress.local-tls
  annotations:
      kubernetes.io/ingress.class: nginx
      cert-manager.io/cluster-issuer: letsencrypt-prod

sub2.domain.com.values.yaml:
ingress:
  enabled: true
  certManager: true
  hostname: sub2.domain.com
  extraTls:
  - hosts:
      - sub2.domain.com
    secretName: wordpress.local-tls
  annotations:
      kubernetes.io/ingress.class: nginx
      cert-manager.io/cluster-issuer: letsencrypt-prod

I apply them with:
helm install sub1 bitnami/wordpress -f sub1.domain.com.values.yaml
helm install sub2 bitnami/wordpress -f sub2.domain.com.values.yaml

Buth are accessible via browser, but only sub1.domain.com is with valid ssl cert, sub2 is with kubernetes fake cert.
What am i doing wrong?

**Tags:** docker, kubernetes, nginx, ingress, wordpress


---

## 1 answers

### Answer by username_1 on 2021-06-07. Score: 1 | Accepted answer

Same TLS secret will not be mapped to two ingress at the same time within a namespace.It will map to the first deployed ingress. Create the same secret with a different name and map it to the other ingress for it to work.

> **Comments:**
> **username_0**: Yes, that was the problem. It's up to bitnami to handle that. By not specifying the name of the tls secret it creates it with different names, so it worked.  

---

