I am installing Traefik with Helm (Chart version 10.1.2) and added a crd middleware, which I setup for both the web and websecure entrypoint. When starting the pod, I got following two errors:
...
time="2021-08-10T22:41:05Z" level=error msg="middleware \"kube-system-security-headers@kubernetescrd\" does not exist" entryPointName=web routerName=web-to-443@internal
...
time="2021-08-10T22:41:06Z" level=error msg="middleware \"kube-system-security-headers@kubernetescrd\" does not exist" entryPointName=web routerName=web-to-443@internal
When calling https sites from my deployment, I see that the middleware works, as it modifys http headers as expected. But I would like to know if there is something wrong with the configuration and if somethings might not work as expected.
The (shortened) K8s deployment object looks like following:
apiVersion: apps/v1
kind: Deployment
...
spec:
...
template:
...
spec:
containers:
- args:
- --entryPoints.web.address=:8000/tcp
- --entryPoints.websecure.address=:8443/tcp
- --entrypoints.web.http.redirections.entryPoint.to=:443
- --entrypoints.web.http.redirections.entryPoint.scheme=https
- --entrypoints.websecure.http.tls=true
...
- --entrypoints.websecure.http.tls.options=kube-system-secure-tls-options@kubernetescrd
- --entrypoints.web.http.middlewares=kube-system-security-headers@kubernetescrd
- --entrypoints.websecure.http.middlewares=kube-system-security-headers@kubernetescrd
image: traefik:2.4.13
...
The K8s middleware object looks like following:
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: security-headers
namespace: kube-system
spec:
headers:
browserXssFilter: true
contentTypeNosniff: true
customResponseHeaders:
Server: ""
X-Frame-Options: sameorigin
X-Powered-By: ""
mxfvor: vefer
forceSTSHeader: true
sslRedirect: true
stsIncludeSubdomains: true
stsPreload: true
stsSeconds: 315360000
Is there a reason for the error output in the logs?