Error while installing kong plugins

Hello,

I’m trying to install kong plugin included in the bundle pack (cors plugin).

The installation failed with the following error:

Error from server (BadRequest): error when creating “kongplugin.yaml”: KongPlugin in version “v1” cannot be handled as a KongPlugin: strict decoding error: unknown field “config.credentials”, unknown field “config.exposed_headers”, unknown field “config.headers”, unknown field “config.methods”, unknown field “config.origins”, unknown field “config.preflight_continue”

All the crds has been successfully created on the cluster.
Kong 2.8
Kong ingress c. 2.5

What could be the point ?

@Gianluca_Artioli can you provide a sample manifest file that you are applying when seeing this error?

Sure @rick :

apiVersion: configuration.konghq.com/v1
kind: KongPlugin
plugin: cors
metadata:
  labels:
    app: kong
    app.kubernetes.io/managed-by: Helm
  name: cors-plugin
  namespace: kong
config:
  credentials: true
  exposed_headers:
    - Content-Length
    - Content-Range
  headers:
    - Authorization
    - Content-Type
    - Accept-Ranges
    - Origin
    - x-requested-with
    - Accept
    - Client-security-token
    - Cache-control
    - Postman-token
    - Range
  methods:
    - GET
    - PUT
    - PATCH
    - POST
    - DELETE
    - OPTIONS
  origins: ["*"]
  preflight_continue: false

I’ve also already checked all the CRD installed.

Gianluca

@Gianluca_Artioli can you try debugging with the following:

kubectl api-resources  | grep kongplugin