# KongPlugin reload

**URL:** <https://discuss.konghq.com/t/kongplugin-reload/6493>\
**Category:** Questions\
**Tags:** kubernetes\
**Created:** [June 11, 2020, 2:25pm UTC](https://discuss.konghq.com/t/kongplugin-reload/6493 "2020-06-11T14:25:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![martink](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/martink/32/2058_2.png) [@martink](https://discuss.konghq.com/u/martink)\
**Post date:** [June 11, 2020, 2:25pm UTC](https://discuss.konghq.com/t/kongplugin-reload/6493/1 "2020-06-11T14:25:36Z")

</div>

Hi all,

I’m trying to figure out how Kong Ingress Controller reloads plugin config. I have Ingress resource with attached KongIngress:

```
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    konghq.com/override: kong-echo
    kubernetes.io/ingress.class: kong-ingress
    plugins.konghq.com: test-whitelist
    ...

apiVersion: configuration.konghq.com/v1
kind: KongIngress
metadata:
  annotations:
    kubernetes.io/ingress.class: kong-ingress
  name: kong-echo
  namespace: default
route:
  methods:
  - GET

```

Here is plugin config:

```
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name: test-whitelist
config:
  whitelist:
    - x.x.x.x
plugin: ip-restriction

```

All works fine when plugin is attached to ingress for the first time but when I update IP address in the plugin the change seems to take effect only occasionally and after quite some delay. I’m running DB-less mode.

Can someone describe me how Kong Ingress Controller reloads resources like plugins?

Thanks,  
Martin

---

<div class="post-metadata">

**Author:** ![martink](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/martink/32/2058_2.png) [@martink](https://discuss.konghq.com/u/martink)\
**Post date:** [June 11, 2020, 2:38pm UTC](https://discuss.konghq.com/t/kongplugin-reload/6493/2 "2020-06-11T14:38:02Z")

</div>

I think I found the problem. I’m using custom ingress class (kong-ingress) so if I add `kubernetes.io/ingress.class: kong-ingress` annotation to KongPlugin changes take effect immediately.

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [June 11, 2020, 6:30pm UTC](https://discuss.konghq.com/t/kongplugin-reload/6493/3 "2020-06-11T18:30:06Z")

</div>

Yeah, this is an annoying issue that causes a lot of problems.

We have a document to fix such issues with custom ingress class.  
Your comments would be very helpful:

> **[KIC and ingress.class behavior](https://docs.google.com/document/d/1qMwurrFiOMoy2EK569y6qY-9cLGKJrkTfloqNyp_J6o/edit?usp=sharing)**
>
> PUBLIC DOCUMENT kubernetes.io/ingress.class annotation is used for Ingress resource and custom resources for filtering purposes. The behavior of the annotation differs across different resources, undcoumented and confuses maintainers and users...
