# Custom plugin as Global

**URL:** <https://discuss.konghq.com/t/custom-plugin-as-global/5670>\
**Category:** Questions\
**Tags:** kubernetes\
**Created:** [March 1, 2020, 6:18am UTC](https://discuss.konghq.com/t/custom-plugin-as-global/5670 "2020-03-01T06:18:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Chatterton](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/michael_chatterton/32/1636_2.png) [@Michael\_Chatterton](https://discuss.konghq.com/u/Michael_Chatterton)\
**Post date:** [March 1, 2020, 6:18am UTC](https://discuss.konghq.com/t/custom-plugin-as-global/5670/1 "2020-03-01T06:18:50Z")

</div>

Hi all,

I’ve managed to get a custom plugin working with Kong Ingress Controller but unable to set the plugin at a global level. I followed this guide to get the custom plugin working with a ConfigMap and changing some of the deployment variables.

[https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/guides/setting-up-custom-plugins.md](https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/guides/setting-up-custom-plugins.md)

If I assign the annotation to the ingress rule then the plugin works and I can see a custom header being set.

```
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: demo
  annotations:
    kubernetes.io/ingress.class: 'kong'
    plugins.konghq.com: 'myheader'
spec:
  rules:
    - http:
        paths:
          - path: /foo
            backend:
              serviceName: echo
              servicePort: 80

```

But when I try to set the plugin at a global level as well as commenting out the annotation on the ingress, then I can’t see the custom header coming through. Has anyone experienced this before?

```
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name: myheader
  namespace: kong
  labels:
    global: 'true'
plugin: myheader

```

Any help greatly appreciated.

---

<div class="post-metadata">

**Author:** ![Michael\_Chatterton](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/michael_chatterton/32/1636_2.png) [@Michael\_Chatterton](https://discuss.konghq.com/u/Michael_Chatterton)\
**Post date:** [March 1, 2020, 10:05pm UTC](https://discuss.konghq.com/t/custom-plugin-as-global/5670/2 "2020-03-01T22:05:30Z")

</div>

Ignore this please - I had conflicting plugins with the same name that meant the plugin could not be set at a global level.
