How to Integrate Datadog with Oracle OKE/Kubernetes

Integrating Datadog with Oracle OKE, lets you gain actionable insights into the performance, availability, and resource utilization of your Kubernetes environment.

How to Integrate Datadog with Oracle OKE/Kubernetes
Maximize container performance with Datadog's Kubernetes integration. Streamline monitoring and gain actionable insights for optimal efficiency.

As the adoption of containerized applications surges, monitoring and observability become paramount for maintaining the health and performance of Kubernetes clusters. In this blog post, you will get to know the integration of Datadog, a powerful monitoring and analytics platform, with Oracle OKE (Oracle Kubernetes Engine). Let's explore how to accomplish this integration step by step.

Installation Of The Datadog Operator

To kick-start the integration process, you need to install the Datadog Operator. The operator streamlines the deployment and management of the Datadog Agent within your Kubernetes cluster. Follow these steps for installation:

Open your terminal and execute the following commands

helm repo add datadog https://helm.datadoghq.com
helm update
helm install datadog-operator datadog/datadog-operator --create-namespace --namespace datadog --version 0.9.2

You can always install the latest version by removing the --version and make sure you have access to Kubernetes cluster API.

💡
You can learn more about the configuration available for this operator at https://github.com/DataDog/datadog-operator/blob/main/docs/configuration.v1alpha1.md

Setup the secret for API communication

To establish secure communication between your Kubernetes cluster and Datadog, you need to configure the API Key and App Key.

To obtain the API Key and App Key for Datadog, follow these steps:

  1. Log in to your Datadog account or sign up for a new account at the Datadog website.
  2. Once logged in, navigate to the "Integrations" section in the Datadog platform.
  3. In the left sidebar, click on "API" under the "Integrations" section.
  4. On the API page, you will find your API Key and App Key. The API Key is used for authentication and authorization for the Datadog API, while the App Key is used for programmatic access to the Datadog platform.
  5. Copy and securely store both the API Key and App Key. They are sensitive credentials and should be treated with care.
💡
For a more detailed step-by-step guide with screenshots, you can refer to the official Datadog documentation on obtaining API and App Keys: Documentation Link

Remember to keep your API Key and App Key confidential and avoid sharing them with unauthorized individuals to maintain the security of your Datadog account and data.

Create a Kubernetes Secret to store the keys securely:

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 actual keys.

Create The Agent Resource In Your Cluster:

Next, you need to create an Agent resource in your Kubernetes cluster. The Agent acts as a bridge, collecting and forwarding metrics, logs, and traces between your cluster and the Datadog platform. Follow these instructions:

Create a YAML file, for example, datadog-agent.yaml, and populate it with the following content:

apiVersion: datadoghq.com/v1alpha1
kind: DatadogAgent
metadata:
  name: datadog-agent
  namespace: datadog
spec:
  site: "datadoghq.com"
  clusterName: oci-develop
  features:
    kubeStateMetricsCore:
      enabled: true
  credentials:
    apiSecret:
      secretName: datadog-secret
      keyName: DATADOG_API_KEY
    appSecret:
      secretName: datadog-secret
      keyName: DATADOG_APP_KEY
  agent:
    env:
      - name: DD_CLOUD_PROVIDER_METADATA
        value: "oracle"
      - name: DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL
        value: "true"

    log:
      enabled: true
      logsConfigContainerCollectAll: true
    image:
      name: "gcr.io/datadoghq/agent:latest"
  clusterAgent:
    image:
      name: "gcr.io/datadoghq/cluster-agent:latest"

Apply the configuration to create the Agent resource using k apply -f datadog-agent.yaml

List Of Available Dashboards From The Datadog For Kubernetes

Once you have integrated Datadog with Oracle OKE/Kubernetes, you can leverage a variety of pre-built dashboards specifically designed to monitor your Kubernetes environment. These dashboards provide valuable insights into cluster health, resource utilization, networking, and more. Here are some of the available dashboards in Datadog for Kubernetes:

Kubernetes Cluster Overview

This dashboard offers a high-level overview of your Kubernetes cluster, providing key metrics such as CPU and memory usage, pod status, and cluster capacity.

Node Monitoring

Gain visibility into the performance and resource utilization of individual nodes within your cluster. Monitor metrics like CPU usage, memory usage, network traffic, and disk utilization per node.

Pod Metrics

Monitor the performance and resource utilization of individual pods in your Kubernetes cluster. This dashboard provides metrics such as CPU usage, memory consumption, and network activity for each pod.

Deployment Monitoring

Track the health and performance of your deployments in real-time. Monitor metrics like replica status, CPU usage, memory consumption, and deployment-specific metrics.

Container Monitoring

Dive deeper into container-level metrics and performance. Monitor CPU usage, memory consumption, network traffic, and disk I/O for individual containers within your cluster.

These are just a few examples of the available dashboards in Datadog for Kubernetes. Additionally, Datadog allows you to customize and create your dashboards based on your specific monitoring needs.

Conclusion

Integrating Datadog with Oracle OKE/Kubernetes empowers you to effectively monitor and manage your containerized environment. By following the installation steps for the Datadog Operator, setting up the API communication secret, creating the Agent resource, and exploring the available dashboards, you can gain actionable insights and maintain optimal performance for your Kubernetes cluster. Leverage the power of Datadog to streamline your monitoring and observability practices in the ever-evolving world of containers.

Resources

  1. https://github.com/DataDog/datadog-operator
  2. https://docs.datadoghq.com/containers/kubernetes/installation/?tab=operator
  3. https://www.datadoghq.com/blog/monitoring-kubernetes-with-datadog/

Getting to know about Kubernetes then do check my other blog Deploy Mendix apps to Kubernetes with Gitlab


Hi! I am Safoor Safdar a Senior SRE. Read More. Don't hesitate to reach out! You can find me on Linkedin, or simply drop me an email at me@safoorsafdar.com