thanks a lot. I solved the issue in a less elegant way by defining a second ingress resource for the www.domain as it was not clear to me that I could simply specify multiple rules:host
I was playing around with nginx.ingress.kubernetes.io/from-to-www-redirect: ‘“true”’ and added both hosts to the tls:hosts section unfortunately without success, as for the host not given under rules:host a wrong certificate was supplied instead of the one from letsencrypt.
I now assume your option is smarter as it solves the same issue with a single ingress and a common letsencrypt certificate.
Anyway, I am now wondering about how things work in Rancher internally and what my approach really costs my means of processing overhead. Did I understand correctly, that the ingress resources are not more than just configurations which are merged together as a configuration for the system/nginx-ingress-controller which is the actual pod responsible for routing/programming of a single load balancer per node? Or is each ingress to be understood as a separate workload running in the background? Hence, would my previous approach mean that two ingresses denote two running pods and with it additional overhead?
And there is a further topic I am wondering about. The yaml for the ingress you define looks quite comprehensible. If I compare it with the yaml, which is generated for the ingress when using the Rancher UI, I see lots of other stuff in there like
Now I am wondering if I do not need all the other stuff that is generated, hence if it is better to work with the rancher ui to get these additional annotations in.
From a repeatability point of view and by means of understandability I would prefer to use sleek yaml files like the one you provided. I think that way I might also be able to use those charts to automate creation of a cluster. So can you comment on what way I should prefer to use, go with RancherUI as I would miss out a lot of preset configuration, or go with manual made charts as the other stuff is not needed or created in the background anyway?
Thanks for the explanation!