Unable to register plugins with kong ingress controller


#1

Hi all Kong users!

I am running Kong(latest version) in Openshift version 3.9. I am running it with Cassandra, and Kong Ingress Controller. I am able to register new Routes, Services, Upstreams and Targets without any problems using Ingress/and KongIngress resources.

However, when i try to register plugins, they never gets registered in the cassandra database, or int the admin API for plugins. Here is the logs from Kong Ingress Controller

I1029 10:15:33.312244 6 run.go:168] Event CONFIGURATION received - object &{{ } {add-ratelimiting-to-route gateway /apis/configuration.konghq.com/v1/namespaces/gateway/kongplugins/add-ratelimiting-to-route 92079620-db63-11e8-8433-005056b948b3 171270526 0 2018-10-29 10:15:33 +0000 UTC <nil> <nil> map[] map[] [] nil [] } false map[hour:100 limit_by:ip second:10] }
I1029 10:15:33.312384 6 queue.go:70] queuing item &{{ } {add-ratelimiting-to-route gateway /apis/configuration.konghq.com/v1/namespaces/gateway/kongplugins/add-ratelimiting-to-route 92079620-db63-11e8-8433-005056b948b3 171270526 0 2018-10-29 10:15:33 +0000 UTC <nil> <nil> map[] map[] [] nil [] } false map[hour:100 limit_by:ip second:10] }

So it reads the update from kubernetes, but as i mentioned before, no plugins is being registered.

Kong Ingress Controller Version
kong-docker-kubernetes-ingress-controller.bintray.io/kong-ingress-controller:0.2.0

Kong Version
kong:0.14.1-centos

I hope someone can help me figure out what is going wrong. Here is the KongPlugin i am trying to use.

apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: add-ratelimiting-to-route
config:
hour: 100
limit_by: ip
second: 10


#2

@jonasvadebo,

Please use the plugins.konghq.com annotation to associate a plugin with an Ingress or a Service object in Kubernetes.
Reference: https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/annotations.md#pluginskonghqcom

Also see https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/deployment/minikube.md#configure-a-kong-plugin-using-annotations-in-ingress.