Kong route plugin recreates automatically after deletion

Hi Community,
We have set up the Kong and used ingress to specify the class kong to the routes. We also used plugins for specific routes and specified the information by using Konga. The plugin to the routes is created.

The ingress I applied looks like :

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    konghq.com/https-redirect-status-code: "301"
    konghq.com/protocols: https
    kubernetes.io/ingress.class: kong
  name: my-dev-ingress
spec:
  rules:
  - host: abc.domain.xyz
    http:
      paths:
      - backend:
          serviceName: name-of-service
          servicePort: 80
        path: /pqr/lmn/

It creates the route and points service that I can see in Konga Dashboard. I have manually applied the ip-restriction plugin to the above route. But whenever I delete or disable the plugin it gets recreated or enables automatically.

It is also strange that another route plugin can be removed except a few once like above.

We need to remove the plugin to the route again. But I’m not able to delete that. If anyone can help me out. Thanks.!

I suspect you’re running into what is a feature of the Kong Ingress Controller – namely that it maintains state for you for anything that happens outside of Kubernetes Ingress manifests. This prevents anything from outside Kubernetes-land from altering the configuration of your cluster (generally viewed as a good thing). You usually want to only change config for K8S using kubectl apply -f <my-blessed-manifest>.yaml

If you want your Konga changes to stick however, change the default for enable-reverse-sync from false to true (CLI Arguments - v1.2.x | Kong - Open-Source API Management and Microservice Management). Note that this violates some of the purpose of using Kubernetes in the first place however.

Thanks for the response, @Aaron_Miller .! I have tried to change the enable-reverse-sync flag to true though I’m not able to remove the plugin in the kong route, It’s recreated.
I Updated the topic with my approach.


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ