Rate-limiting per route

My question is that I have an Ingress within multiple paths so how can I specify different rate-limiting for each one separately while they’re defined in one Ingress (don’t notice to the bad indentation)

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
configuration.konghq.com: xdr-raw-api
plugins.konghq.com: xdr-raw-api-rate-limiting
name: xdr-raw-api
namespace: acc3-iot-api
spec:
rules:
- http:
paths:
- backend:
serviceName: xdr-raw-api
servicePort: http
path: /iot/api/xdr/sampl1111
- backend:
serviceName: xdr-raw-api
servicePort: http
path: /iot/api/xdr/sampl2222

You need to create an Ingress resource for each path separately and then define associate a different KongPlugin (which has different limits) to each one of those.

2 Likes