By zalew
Hello,
I have a Kubernetes cluster with a simple static page container serving for now, and the site on http:// shows up just fine. I set up LetsEncrypt in the load balancer admin panel according to this instruction: https://www.digitalocean.com/docs/networking/load-balancers/how-to/lets-encrypt, but on https:// it returns default backend - 404, and in the Ingress controller logs there are errors:
│ W0625 00:07:48.175103 6 backend_ssl.go:49] error obtaining PEM from secret default/key-name: error retrieving secret default/key-name: secret default/key-name was not found │
│ W0625 00:07:48.175270 6 controller.go:1020] ssl certificate "default/key-name" does not exist in local store
I don’t know the actual key location or the files to try to manually configure that, only the name in the admin panel.
ingress.yml fragment
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress-main
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
spec:
tls:
- hosts:
- mydomain.com
secretName: key-name
What is the issue, and how to fix this, what am I missing here? Thank you very much for your help. Jakub
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!
Secret “key-name” and ingress need to be in the same namespace.
There is a working script you can run to provision K8s on Digital Ocean (DOKS) complete with A record, LoadBalancer, Ingress with LetsEncrypt TLS termination. If you look at the Harbor or Jenkins ingresses after the installation you might be able to compare it with yours.
Kubernetes with CI/CD, Provisioning Script for DigitalOcean (DOKS)
Thank you for your response. Since by your recommendation I dropped to not using the UI for issuing certificate, I just went through this tutorial https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-on-digitalocean-kubernetes-using-helm and it worked perfectly.
Cheerz.
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.