How enable datadog plugin for k8s/dbless/ingressController

Hi All,

I would like to enable this plugin:

According to doc I need to use:

plugins:
- name: datadog
  service: {service}
  config: 
    host: 127.0.0.1
    port: 8125

in a declarative configuration.

As I’m using helm chart to deploy Kong I found option: dblessConfig.
However, this only available when ingressController is disabled.

Is Datadog plugin working only when ingressController is disabled? If yes, then why?

kong1.4, helm chart 0.27

You need to define KongPlugin resource for this instead.
https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/guides/using-kongplugin-resource.md can help you understand how this all works.

Thanks @hbagdi for your anwser.

I was able to turn on Datadog plugin in Kong 2.0:

apiVersion: configuration.konghq.com/v1
config:
  host: datadog-agents-service.other-namespace.svc
  port: 8125
kind: KongPlugin
metadata:
  annotations:
  name: my-kong-datadog
plugin: datadog

Then in Ingress:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    konghq.com/plugins: my-kong-datadog
    ...
  ...

WARNING: Datadog plugin uses UDP (not TCP) connection. Please make sure your network configuration allows such communication on port 8125.

For some reason I was not able to do it in Kong 1.4.

How did you installed Datadog? Because I don’t have any service called datadog-agent, this is what I have:

NAME
pod/datadog-agent-5wl4g
pod/datadog-agent-kube-state-metrics-66b476ff78-8p7bt
pod/datadog-agent-x9phf

NAME
service/datadog-agent-kube-state-metrics
service/kubernetes

NAME
daemonset.apps/datadog-agent

NAME
deployment.apps/datadog-agent-kube-state-metrics

NAME
replicaset.apps/datadog-agent-kube-state-metrics-66b476ff78

Created service by my self:

apiVersion: v1
kind: Service
metadata:
  annotations:
  name: datadog-agent
spec:
  ports:
  - name: http
    port: 8125
    protocol: UDP
    targetPort: 8125
  selector:
    app: datadog-agent
  sessionAffinity: None
  type: ClusterIP

how do you check if kong-plugins sending data or not ? which logs to see.


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ