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?