Hi,
I have traefik (v2.3.5) deployed into its own Kubernetes using helm and have a TLSStore defined within the same ingress-traefik namespace:
---
apiVersion: traefik.containo.us/v1alpha1
kind: TLSStore
metadata:
name: default
namespace: ingress-traefik
spec:
defaultCertificate:
secretName: default-certs
And then I have the dashboard exposed successfully on the websecure endpoint to an internal domain within that same namespace:
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: dashboard-traefik
namespace: ingress-traefik
spec:
entryPoints:
- websecure
routes:
- match: Host(`traefik.internal.mydomain.com`)
kind: Rule
services:
- name: api@internal
kind: TraefikService
middlewares:
- name: dashboard-auth
- name: traefik-redirect
tls:
certResolver: default
And this loads fine and presents the right certificate provided by the default certResolver without any errors in the traefik logs.
However when I define a new IngressRoute
that is in a different name space and reference that same certResolver
like so:
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: my-service
namespace: common
spec:
entryPoints:
- websecure
routes:
- match: Host(`apps.internal.mydomain.com`) && PathPrefix(`/common/server`)
kind: Rule
services:
- name: my-service
kind: Service
port: 80
namespace: common
middlewares:
- name: app-path-strip
namespace: ingress-traefik
tls:
certResolver: default
It still loads fine in the browser, the expected cert provided by the default certResolver is being presented properly however I get the following error in the traefik logs:
time="2021-01-28T18:12:00Z" level=error msg="the router common-my-service-71a719041a1b93f3d869@kubernetescrd uses a non-existent resolver: default"
I assume this is because my default certResolver is in the ingress-traefik namespace, should I be replicating that Secret and TLSStore into the common namespace?
It feels odd that it is giving me an error but still working.
Thanks