K8s + Kong + Ingress Controller + Proxying

Hi,

I am currently trying to upgrade from a very old version of Kong to the latest v1.4.2 version, and want to use CRDs to configure Kong, which is currently done using a custom scripts.

I do not want to use the Ingress resource to expose Kong to the external world; I expose Kong directly using an NLB on AWS. Having said this, I have a few questions:

  1. One of the proxies I use is a Datadog proxy, where external clients send metrics to Kong, which then gets forwarded to dogstatsd agent running locally on the cluster. Is my understanding correct that I need to:
  • create an Ingress with the right path
  • forward it to the Datadog agent running on UDP/8125.

How can I achieve the TCP incoming data forwarding to a UDP server in the cluster.
From what I have read, this might not be possible and in that case, I have to send the data directly to Datadog bypassing the local agents. In the second case, do I create a KongConsumer to load the API keys? Or is there some other mechanism to inject the keys in the request before forwarding them?

  1. A lot of our APIs are based on a distinct client IDs which are created dynamically. An example would be /api/v1/cliend_id/action. Is there a way to create this Service to forward once globally, or is there a neat regex way of doing this in one go when deploying Kong. An important point to note is that I am planning to enable the Datadog plugin for every request tagged by clientID, and my understanding is that the global declaration will not help me achieve that. Is that correct?

Thanks!


Krish

Yes that’s possible and recommended.

This is not possible with Kong (today).

You can use regular expressions in paths to achieve this.

I’m not sure I follow.

Kong’s datadog plugin sends metrics about requests flowing through Kong. It has got nothing to do with metrics that are forwarded via Kong to a Datadog agent/server.

Thanks for the response.

Kong’s datadog plugin sends metrics about requests flowing through Kong. It has got nothing to do with metrics that are forwarded via Kong to a Datadog agent/server.

Let me elaborate. Is there a way to tag every Kong Service and Kong Route to send metrics when they are executed?
I read in the Admin API docs that tagging and filtering based on tags are allowed. So am I right in understanding that these tags will be propagated to Datadog where I can have fine grained alerts?

Another related question is: Kong Services can be tagged, but how does tagging happen in Kubernetes when K8s Services are mapped to Kong Services?

No. This is not supported.

That is not supported.


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ