Install Datadog
Datadog provides several ways to implement their product; However, this tutorial uses the "Datadog operator" approach to install Datadog.
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
- Basic Codiac Prerequisites
- A secret store created with your provider and added to your Codiac account.
- An active Datadog account and API key.
- 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
- Put your Datadog
apiKey
into a secret store that you have added to Codiac.
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.
- Set your Datadog
apiKey
into the Helm values file. For example, the command for anapiKey
nameddatadog-api-key
in an Azure key vault namedour-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'
- 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 ""
-
Repeat the previous step for any additional configuration options. For available configuration options on the Datadog operator, see their page on Artifact Hub.
-
Create an environment dedicated to Datadog.
codiac environment create datadog --silent
- 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
- At this point, the Codiac and cluster sides are done. You can now log into your Datadog account and start observing your data.