Datadog Gold Partner logo

Datadog Key Points — Part 2

By Lamai Anthony.May 01, 2023

Installing Datadog Agent on a Kubernetes cluster using helm chart and Configuring Log Collection

Generally, the installation of Datadog on any platform involves the following steps:

  1. Log in to datadog.
  2. Navigate to Integrations > Agent and click on your desired platform.
  3. Click the Select API Key button and select the API key. Select the Use API Key button to have your API Key automatically populated in the commands.

Depending on the platform you are installing Datadog provides a one step install command. If otherwise steps to complete a basic install will be provided.

Article Datadog key points Part2 1

Currently, the Datadog Agent can be installed in a Kubernetes environment through three different methods: Datadog Operator, Helm Chart, and DaemonSet. We will install Datadog using Helm on a Windows machine.

  1. Install Helm. For a Windows machine, we are using the Chocolatey package manager.
choco install kubernetes-helm

2. Download Datadog Chart.

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

3. Update the Helm Chart.

helm repo update

4. Retrieve your Datadog API key by Signing in to Datadog. Open your Organization Settings page, and under Access select API Keys.

5. Create sample values.yaml file.

6. Run the below command to add the Datadog Agent to all nodes in your cluster with a DaemonSet. The command will install Datadog cluster Agent, create a Datadog namespace, enable log collection and Kubernetes State Metrics Core.

helm install datadog -f values.yaml  -n datadog --set datadog.clusterName='clustername' --set datadog.site='datadoghq.com' --set datadog.clusterAgent.replicas='2' --set datadog.clusterAgent.createPodDisruptionBudget='true' --set datadog.kubeStateMetricsEnabled=true --set datadog.kubeStateMetricsCore.enabled=true --set datadog.logs.enabled=true --set datadog.logs.containerCollectAll=true --set datadog.apiKey='YourApiKey' --set datadog.processAgent.enabled=true datadog/datadog --create-namespace

For more information information on configuring the Agent visit here.

When the Datadog Agent is deployed to collect logs, Datadog recommends using the Kubernetes log file logic when Docker is not the runtime, or More than 10 containers are used on each node. To enable log collection with Helm, You can set the datadog.logs.containerCollectAll to true to collect logs from all discovered containers by default.

Checkout Datadog Agent documentation for more information.


The original article published on Medium.

Related Posts