How to Fix SSL Certificate Error in Traefik with K3d?

0
14
Asked By TechWanderer123 On

I'm setting up a K3d cluster using Traefik and ran into an issue. The log from the Traefik pod says: `Error configuring TLS: secret my-ns/my-app-tls-cert-ingress does not exist`. I understand that this error means the specified Kubernetes secret isn't there. Do I need to create a PEM file and apply it as a secret with that exact name and namespace? And should this PEM include the certificate chain along with the private key?

2 Answers

Answered By User1234 On

After following the advice and creating the secret, I'm now facing an internal server error, but there are no logs from the app to help debug which container is being hit. It's puzzling because removing SSL allows it to work fine. What should I check next with my Kubernetes setup?

Answered By CloudNinja99 On

Yes, you definitely need to create a TLS secret that matches the name and namespace Traefik is looking for. The secret should include your public certificate and the private key, both in PEM format. You can do this with the following command:

`kubectl create secret tls my-app-tls-cert-ingress \ --cert=cert.pem \ --key=key.pem \ -n my-ns`

Once that's set up, Traefik should automatically detect it.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.