# Error while installing kong plugins

**URL:** <https://discuss.konghq.com/t/error-while-installing-kong-plugins/12589>\
**Category:** Questions\
**Created:** [April 17, 2024, 5:57pm UTC](https://discuss.konghq.com/t/error-while-installing-kong-plugins/12589 "2024-04-17T17:57:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gianluca\_Artioli](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/gianluca_artioli/32/4443_2.png) [@Gianluca\_Artioli](https://discuss.konghq.com/u/Gianluca_Artioli)\
**Post date:** [April 17, 2024, 5:57pm UTC](https://discuss.konghq.com/t/error-while-installing-kong-plugins/12589/1 "2024-04-17T17:57:56Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![rick](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/rick/32/4446_2.png) [@rick](https://discuss.konghq.com/u/rick)\
**Post date:** [April 18, 2024, 5:09pm UTC](https://discuss.konghq.com/t/error-while-installing-kong-plugins/12589/2 "2024-04-18T17:09:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Gianluca\_Artioli](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/gianluca_artioli/32/4443_2.png) [@Gianluca\_Artioli](https://discuss.konghq.com/u/Gianluca_Artioli)\
**Post date:** [April 30, 2024, 7:40am UTC](https://discuss.konghq.com/t/error-while-installing-kong-plugins/12589/3 "2024-04-30T07:40:30Z")

</div>

Sure @rick :

```auto
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

---

<div class="post-metadata">

**Author:** ![rick](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/rick/32/4446_2.png) [@rick](https://discuss.konghq.com/u/rick)\
**Post date:** [April 30, 2024, 2:51pm UTC](https://discuss.konghq.com/t/error-while-installing-kong-plugins/12589/4 "2024-04-30T14:51:07Z")

</div>

@Gianluca_Artioli can you try debugging with the following:

```auto
kubectl api-resources | grep kongplugin

```

---

<div class="post-metadata">

**Author:** ![Gianluca\_Artioli](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/gianluca_artioli/32/4443_2.png) [@Gianluca\_Artioli](https://discuss.konghq.com/u/Gianluca_Artioli)\
**Post date:** [May 2, 2024, 9:14am UTC](https://discuss.konghq.com/t/error-while-installing-kong-plugins/12589/5 "2024-05-02T09:14:30Z")

</div>

![image](https://canada1.discourse-cdn.com/flex036/uploads/konghq/original/2X/0/07944f2daf996cde34f1723f040a334df2c67a06.png)

Errror reported with the previous yaml manifest

[centos@bastion ~]$ k create -f kongplugin.yaml  
error: error validating “kongplugin.yaml”: error validating data: [ValidationError(KongPlugin.config): unknown field “credentials” in com.konghq.configuration.v1.KongPlugin.config, ValidationError(KongPlugin.config): unknown field “exposed\_headers” in com.konghq.configuration.v1.KongPlugin.config, ValidationError(KongPlugin.config): unknown field “headers” in com.konghq.configuration.v1.KongPlugin.config, ValidationError(KongPlugin.config): unknown field “methods” in com.konghq.configuration.v1.KongPlugin.config, ValidationError(KongPlugin.config): unknown field “origins” in com.konghq.configuration.v1.KongPlugin.config, ValidationError(KongPlugin.config): unknown field “preflight\_continue” in com.konghq.configuration.v1.KongPlugin.config]; if you choose to ignore these errors, turn validation off with --validate=false
