Hey! I've been trying for the past 3 hours looking at this, but I couldn't find a solution.
For some reason when I add the compression middleware as a annotation in the "Ingress" yaml it fails.
After looking at the UI, which works, it says that it can't find the middleware for some reason.
Also, I searched in most of the posts in here, most of them says that is something related to the provider, which I should follow this: <k8s namespace>-<middleware-name>@kubernetescrd, but I'm already doing that.
My ingress file:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: whoami-ingress
annotations:
traefik.ingress.kubernetes.io/router.middlewares: testes-compression@kubernetescrd
spec:
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: whoami
port:
name: web
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: compression
spec:
compress: {}
My traefik file:
kind: Deployment
apiVersion: apps/v1
metadata:
name: traefik-deployment
labels:
app: traefik
spec:
replicas: 1
selector:
matchLabels:
app: traefik
template:
metadata:
labels:
app: traefik
spec:
serviceAccountName: traefik-account
containers:
- name: traefik
image: traefik:v2.9
args:
- --api.insecure
- --providers.kubernetescrd
- --providers.kubernetesIngress
- --entryPoints.web.address=:80
- --log.level=DEBUG
ports:
- name: web
containerPort: 80
- name: dashboard
containerPort: 8080