K8s middldeware not working

The following K8s implementation correctly creates an IngressRoute however the rate limiting is not applied.

kind: Deployment
apiVersion: apps/v1
metadata:
  name: whoami
  labels:
    app: containous
    name: whoami
spec:
  replicas: 2
  selector:
    matchLabels:
      app: containous
      task: whoami
  template:
    metadata:
      labels:
        app: containous
        task: whoami
    spec:
      containers:
        - name: containouswhoami
          image: containous/whoami
          ports:
            - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: service-test
spec:
  ports:
    - name: http
      port: 80
  selector:
    app: containous
    task: whoami
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: fontend
spec:
  entryPoints: 
    - web
  routes:
     - middlewares: 
       - name: service-rate-limiter
     - match: Path(`/bar`)
       kind: Rule
       services:
        - name: service-test
          port: 80
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: service-rate-limiter
spec:
  rateLimit:
    average: 1
    period: 100

Can anyone help?

Cheers

Hi @mojo,

Can you be more explicit when you mean "rate limiting"?

Cheers

Hi,

Sorry, I want to limit the service to receive 1 request max per 100 (as a very constrained test). This doesn't appear to work - the service will accept more requests than that.

Cheers!