DATADOG MULE® INTEGRATION

K8 Kubernetes

Prerequisites:

 

  • Have a running Kubernetes cluster on AWS (e.g., using Amazon EKS).

  • Ensure that kubectl is installed and configured to interact with your Kubernetes cluster.

  • Make sure you have a Datadog account and access to your API Key and APP Key.

 

Deploy an Agent with the Operator

 

      1. Install the Datadog Operator:

  • helm repo add datadog https://helm.datadoghq.com

  • helm install my-datadog-operator datadog/datadog-operator

 

       2. Create a Kubernetes secret with your API and app keys

  • kubectl create secret generic datadog-secret --from-literal api-key=<DATADOG_API_KEY> --from-literal app-key=<DATADOG_APP_KEY>

     Replace <DATADOG_API_KEY> and <DATADOG_APP_KEY> with your Datadog API and application keys.

 

      3. Create a file.

  • datadog-agent.yaml

     with the spec of your Datadog Agent deployment configuration.
    
The simplest configuration is as follows: Replace <DATADOG_SITE> with your Datadog site.
     Your site is datadoghq.com. (Ensure the correct SITE is selected on the right).

init_config:
  global:
    site: datadoghq.com
    credentials:
      apiSecret:
        secretName: datadog-secret
        keyName: api-key
      appSecret:
        secretName: datadog-secret
        keyName: app-key
  override:
    clusterAgent:
      image:
        name: gcr.io/datadoghq/cluster-agent:latest
    nodeAgent:
      image:
        name: gcr.io/datadoghq/agent:latest
  features:
    apm:
      enabled: true
    hostPortConfig:
      enabled: true
    eventCollection:
      collectKubernetesEvents: true
    npm:
      enabled: true
    logCollection:
      enabled: true
      containerCollectAll: true
    liveProcessCollection:
      enabled: true
    externalMetricsServer:
      enabled: true
    liveContainerCollection:
      enabled: true
    orchestratorExplorer:
      enabled: true

       4. Deploy the Datadog Agent with the above configuration file:

  • kubectl apply -f /path/to/your/datadog-agent.yaml

 

      5. Monitoring Your Kubernetes Cluster in Datadog:

  • Log in to your Datadog account and navigate to the "Infrastructure" > "Host Map" view.

  • You should see your Kubernetes nodes listed here and be able to view metrics and logs from your cluster.

 

Grapefruit slice atop a pile of other slices

      6. Final Remarks:

  1. Remember to customize your Datadog Agent configuration to suit your specific needs, including adding additional integrations, tags, and labels as necessary.

  2. You can also enable Datadog's APM and Log Management features to monitor your applications and logs more comprehensively.