Skip to main content

TLS Certificates Store

In Traefik Hub API Gateway, certificates are grouped together in certificates stores.

Note that, any store definition other than the default one (named default) will be ignored, and there is therefore only one globally available TLS store.

Configuration Example

apiVersion: traefik.io/v1alpha1
kind: TLSStore
metadata:
name: default # Only the store with the name default is taken into account
namespace: traefik
spec:
certificates:
- secretName: secret-tls-01
- secretName: secret-tls-02
defaultGeneratedCert:
# Use the certificate resolver myresolver (defined in the static configuration) to generate the default certificate
resolver: myresolver
domain:
main: whoami-default.localhost
sans:
- \*.whoami-default.localhost

Configuration Options

FieldDescriptionDefaultRequired
nameName of the TLS Store. Only the default store name is taken into account yet.True
certificatesList of Kubernetes Secrets, each of them holding a key/certificate pair to add to the store. List item format: secretName: $secret_nameFalse
defaultCertificate.secretNameKubernetes Secret served for connections without a SNI, or without a matching domain.
If no default certificate is provided, Traefik will use the generated one.
Do not use if the option defaultGeneratedCert is set.
False
defaultGeneratedCert.resolverName of the ACME resolver to use to generate the default certificate.
Do not use if the option defaultCertificate is set.
False
defaultGeneratedCert.domain.mainMain domain used to generate the default certificate.
Do not use if the option defaultCertificate is set.
False
defaultGeneratedCert.domain.sansList of Subject Alternative Name used to generate the default certificate.
Do not use if the option defaultCertificate is set.
False
DefaultCertificate vs DefaultGeneratedCert

If both defaultCertificate and defaultGeneratedCert are set, the TLS certificate contained in defaultCertificate.secretName is served. The ACME default certificate is not generated.