0

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?

1
+50

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.

1
  • 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
    Jun 8 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.