By delioda
I followed this tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-with-cert-manager-on-digitalocean-kubernetes
And it worked at first, I set it up for one domain I have, and also for a subdomain, all seems good. I needed, though, to add another domain and it doe snot seem to work. after following the tutorial, what I did is to go to the ingress for my websites and do like this:
code
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
tls:
- hosts:
- mydomain.com
- hello.mydomain.com
- my-SECOND-domain.com
- smething.my-SECOND-domain.com
secretName: hello-kubernetes-tls
but in the ingress_nginx_svc.yaml I have:
code
metadata:
annotations:
service.beta.kubernetes.io/do-loadbalancer-enable-proxy-protocol: 'true'
service.beta.kubernetes.io/do-loadbalancer-hostname: "mydomain.com"
Now I have my DNS records pointing to the external IP but for the my-SECOND-domain.com entries, when navigating to the page, I have an invalid certificate, chrome tells me that is using: FAKE acme certificate, while for the other domain the certificate is valid
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Interesting, I wonder if since your TLS secret is already created and not expired, cert-manager doesn’t try to update it with the new domain names.
You could try deleting the ingress and TLS secret and recreating them.
But probably the better solution (to avoid having to delete and recreate certs) is to create a new ingress object for your new domain:
code
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
tls:
- hosts:
- my-SECOND-domain.com
- smething.my-SECOND-domain.com
secretName: seconddomain-kubernetes-tls
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.