Let's Encrypt on load balancer and Ingress (K8S)


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:, 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
  name: ingress-main
  annotations: nginx "true"
  - hosts:
    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

Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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 and it worked perfectly.


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)