How to properly configure the default ssl cert

I have a default certificate set up, but yet traefik is still serving using its self signed cert... what am I doing wrong?

    entryPoints:
      http:
        address: ":80"
      https:
        address: ":443"
    providers:
      kubernetesIngress: {}
    tls:
      stores:
        default:
          defaultCertificate:
            certFile: /ssl-certs/tls.crt
            keyFile: /ssl-certs/tls.key
    api:
      dashboard: true
      insecure: true
    metrics:
      prometheus: {}
    accessLog: {}

Hello, can you post the rest of it? I.e. full configs, logs, with debugging enabled, etc. I posted a bit more on what's useful when diagnosing here

After further research it seems like this is not supported by traefik 2. Traefik 1 supports a default cert.

Hello,

the tls section, in v2, is a part of the dynamic configuration, so you cannot define it the static configuration (traefik.yml)

You have to use the file provider to define the default certificate.

https://docs.traefik.io/v2.1/https/tls/#default-certificate

Correct, which I cannot use the file provider to provide defaults to all of my kubernetes ingresses. Disappointing. Sticking with Traefik v1 for now. We were looking into EE, but won't do so until this limitation is lifted.

If you are able to use a file for the static configuration, you can use a file for the dynamic configuration, you just have to use a configMap.

It's mainly the same thing with the v1.

FYI the current versions of TraefikEE are based on Traefik v1

1 Like