Looking for examples and doc reference

Hi friends,

First, I am new to Kong.

I have set up DBless Kong on DO K8S, where Kong is proxying to Web and API backends. We have multiple APIs (e.g. users, login, categories etc…). Below docs, I have set up the kong proxy but I don’t find any docs where multiple API resources are setup

Appreciate if you guys could point me to the doc resource and example where multiple API resources are configured.

Thank a lot in advance

Arvind

1 Like

You can repeat the same steps for other APIs.

Thanks for the response
So basically for each API resources (/v1/resource1, /v1/resource2, etc… ) we need separate KongIngress?
What is I have to add rate-limit rule at sub resource (/v1/resource1/{id}/sub-resource) level?
Appreciate if you can point to any example

Thanks,
Arvind

You don’t need a KongIngress resource for these.
KongIngress resource is only for extending the Ingress resource.

You can club multiple rules inside the same Ingress resource as well. You don’t necessarily need a separate Ingress resource for each API resource.

For that specific route, you need to have a different Ingress resource, and then apply a rate-limiting plugin on top of it.

Thanks Harry, Let me try it.

Hi Harry,

Thanks, but can you please point how to setup kong cors plugin on ingress?

Thanks,
Arvind

does this plug cong looks good?

apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: http-cors
namespace: app-dev
plugin: cors
config:
origins: “https://my.origin.net
methods:

  • GET
  • POST
  • PUT
  • DELETE
  • PATCH
  • OPTIONS
    headers:
  • Accept
  • Accept-Version
  • Content-Length
  • Content-MD5
  • Content-Type
  • Date
  • X-Auth-Token
    exposed_headers: X-Auth-Token
    credentials: true
    max_age: 3600

© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ