# Error with Middleware and Plugin AuthCookie Configuration: “Invalid middleware type or middleware not found.”

**URL:** <https://community.traefik.io/t/error-with-middleware-and-plugin-authcookie-configuration-invalid-middleware-type-or-middleware-not-found/26452>\
**Category:** Traefik v3 (latest)\
**Tags:** plugin, middleware\
**Created:** [February 11, 2025, 12:39pm UTC](https://community.traefik.io/t/error-with-middleware-and-plugin-authcookie-configuration-invalid-middleware-type-or-middleware-not-found/26452 "2025-02-11T12:39:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shayktrust](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/shayktrust/32/9952_2.png) [@shayktrust](https://community.traefik.io/u/shayktrust)\
**Post date:** [February 11, 2025, 12:39pm UTC](https://community.traefik.io/t/error-with-middleware-and-plugin-authcookie-configuration-invalid-middleware-type-or-middleware-not-found/26452/1 "2025-02-11T12:39:42Z")

</div>

**Issue with Middleware Configuration Using Plugin AuthCookie in Traefik (Kubernetes CRD)**

Hi Traefik Community,

I'm currently experiencing an issue while configuring a middleware that utilizes the **AuthCookie** plugin in Traefik with Kubernetes CRD. I have carefully followed the documentation and created the required middleware, but I keep encountering the following error:

```auto
invalid middleware "xxxx-xxxx-xxxx-authcookie@kubernetescrd" configuration: invalid middleware type or middleware does not exist

```

 ![image](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/b4cd65ad38457aa370f0fd3a3da4f7a70dfbc293.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/bb779ff7fef268bf733e63cf84afb82bf9053239.png)

I’m not sure if this helps, but here’s my **Helm `values.yaml`** configuration:

```auto
deployment:
  replicas: 1

  resources:
    requests:
      cpu: "100m"
      memory: "512Mi"
    limits:
      cpu: "500m"
      memory: "1024Mi"

  podAnnotations:
    prometheus.io/scrape: "true"
    prometheus.io/port: "8080"

  additionalVolumes:
    - name: plugins
      emptyDir:
        medium: Memory

  additionalVolumeMounts:
    - name: plugins
      mountPath: /etc/traefik/plugins-storage
      readOnly: false

  extraContainers:
    volumeMounts:
      - name: plugins
        mountPath: /etc/traefik/plugins-storage
        readOnly: false

service:
  enabled: false
  type: LoadBalancer
  ports:
    web:
      port: 80
      targetPort: 8000
    websecure:
      port: 443
      targetPort: 8443

ingressClass:
  enabled: false
  isDefaultClass: true

providers:
  kubernetesCRD:
    enabled: true
  kubernetesIngress:
    enabled: true
    publishedService:
      enabled: true

logs:
  general:
    level: "TRACE

```

Additionally, I have developed and published the **AuthCookie** middleware plugin, which can be found here:  
[authcookie](https://plugins.traefik.io/plugins/67a9dc48732aa22ce948f50a/authcookie)

I would appreciate any insights or guidance on resolving this issue. Thanks in advance for your help!

Best,  
Shay
