Skip to main content

Install Datadog

Datadog provides several ways to implement their product; However, this tutorial uses the "Datadog operator" approach to install Datadog.

tip

This approach uses Codiac to install the Datadog Helm chart. This saves your settings, so it's easier for you to add clusters in the future.

Prerequisites
  1. Create the Datadog asset from their Helm chart at Artifact Hub.
codiac asset create \
--name datadog-operator \
--code datadog-operator \
--image datadog-operator \
--registry helm|artifactHub|datadog \
--port 1111
  1. Put your Datadog apiKey into a secret store that you have added to Codiac. 
tip

Use codiac secretStore list to see the secret stores you have added to Codiac. If your secret store isn't listed there, use codiac secretStore capture to it.

  1. Set your Datadog apiKey into the Helm values file. For example, the command for an apiKey named datadog-api-key in an Azure key vault named our-secret-store is:
codiac config add \
--silent \
-a datadog-operator \
-t helm \
--enterprise-scope \
--setting apiKey \
--value '#REF|azKeyVault|our-secret-store|datadog-api-key'
  1. Since Datadog doesn't watch all namespaces by default, configure it to do so:
codiac config add \
--silent \
-a datadog-operator \
-t helm \
--enterprise-scope \
--setting watchNamespaces \
--value ""
  1. Repeat the previous step for any additional configuration options.  For available configuration options on the Datadog operator, see their page on Artifact Hub.  

  2. Create an environment dedicated to Datadog.

codiac environment create datadog --silent
  1. For each of your clusters (e.g.,  my-cluster-xyz):
  • a. Attach the cluster to your Datadog environment.

    codiac environment cluster attach \
    --environment datadog \
    --cluster my-cluster-xyz \
    --silent
  • b. Create a cabinet dedicated to Datadog for that cluster.

    codiac cabinet create \
    datadog-my-cluster-xyz \
    --environment datadog \
    --cluster my-cluster-xyz \
    --silent
  • c. Deploy the datadog-operator asset to that cabinet.

    codiac asset deploy \
    -e datadog \
    -a datadog-operator \
    --version 1.0.5-27 \
    -c dev-latest \
    --silent
  1. At this point, the Codiac and cluster sides are done.  You can now log into your Datadog account and start observing your data.