Read about the Datadog Cluster Agent in the [official documentation](https://docs.datadoghq.com/agent/kubernetes/cluster/).
Run the following if you want to deploy the chart with the Datadog Cluster Agent.
Note that specifying `clusterAgent.metricsProvider.enabled=true` will enable the External Metrics Server.
If you want to learn to use this feature, you can check out this [walkthrough](https://github.com/DataDog/datadog-agent/blob/master/docs/cluster-agent/CUSTOM_METRICS_SERVER.md).
The Leader Election is enabled by default in the chart for the Cluster Agent. Only the Cluster Agent(s) participate in the election, in case you have several replicas configured (using `clusterAgent.replicas`.
You can specify the token used to secure the communication between the Cluster Agent(s)q and the Agents with `clusterAgent.token`. If not specified, a random one will be generated and you will be prompted a warning when installing the chart.
Run the following if you want to deploy the chart with the Datadog Cluster Agent:
```bash
helm install--name datadog-monitoring \
--set datadog.apiKey=YOUR-API-KEY-HERE\
--set datadog.appKey=YOUR-APP-KEY-HERE\
--set datadog.apiKey=<DATADOG_API_KEY>\
--set datadog.appKey=<DATADOG_APP_KEY\
--set clusterAgent.enabled=true\
--set clusterAgent.metricsProvider.enabled=true\
stable/datadog
```
## Uninstalling the Chart
**Note**: Specifying `clusterAgent.metricsProvider.enabled=true` enables the External Metrics Server.
If you want to learn to use this feature, you can check out this [Datadog Cluster Agent walkthrough](https://github.com/DataDog/datadog-agent/blob/master/docs/cluster-agent/CUSTOM_METRICS_SERVER.md).
The Leader Election is enabled by default in the chart for the Cluster Agent. Only the Cluster Agent(s) participate in the election, in case you have several replicas configured (using `clusterAgent.replicas`.
#### Cluster Agent Token
You can specify the Datadog Cluster Agent token used to secure the communication between the Cluster Agent(s) and the Agents with `clusterAgent.token`.
**If you don't specify a token, a random one is generated at each deployment so you must use `--recreate-pods` to ensure all pod use the same token.** see[Datadog Chart notes](https://github.com/helm/charts/blob/57d3030941ad2ec2d6f97c86afdf36666658a884/stable/datadog/templates/NOTES.txt#L49-L59) to learn more.
### Upgrading
#### From 1.19.0 onwards
Version `1.19.0` introduces the use of release name as full name if it contains the chart name(`datadog` in this case).
E.g. with a release name of `datadog`, this renames the `DaemonSet` from `datadog-datadog` to `datadog`.
The suggested approach is to delete the release and reinstall it.
#### From 1.0.0 onwards
Starting with version 1.0.0, this chart does not support deploying Agent 5.x anymore. If you cannot upgrade to Agent 6.x, you can use a previous version of the chart by calling helm install with `--version 0.18.0`.
See [0.18.1's README](https://github.com/helm/charts/blob/847f737479bb78d89f8fb650db25627558fbe1f0/stable/datadog/README.md) to see which options were supported at the time.
### Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
To uninstall/delete the `<RELEASE_NAME>` deployment:
```bash
helm delete my-release
helm delete <RELEASE_NAME> --purge
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Configuration
The following table lists the configurable parameters of the Datadog chart and their default values.
**Tip**: You can copy and customize the default [values.yaml](values.yaml)
### Enabling Process Collection
### Image repository and tag
Update your [datadog-values.yaml](values.yaml) file with the process collection configuration:
Datadog [offers two variants](https://hub.docker.com/r/datadog/agent/tags/), switch to a `-jmx` tag if you need to run JMX/java integrations. The chart also supports running [the standalone dogstatsd image](https://hub.docker.com/r/datadog/dogstatsd/tags/).
```
datadog:
(...)
processAgentEnabled: true
```
Starting with version 1.0.0, this chart does not support deploying Agent 5.x anymore. If you cannot upgrade to Agent 6.x, you can use a previous version of the chart by calling helm install with `--version 0.18.0`.
By default, the Datadog Agent runs in a DaemonSet. It can alternatively run inside a Deployment for special use cases.
### Kubernetes event collection
**Note:** simultaneous DaemonSet + Deployment installation within a single release will be deprecated in a future version, requiring two releases to achieve this.
Use the [Datadog Cluster Agent](#enabling-the-datadog-cluster-agent) to collect Kubernetes events. Please read [the official documentation](https://docs.datadoghq.com/agent/kubernetes/event_collection/) for more context.
### Secret
Alternatively set the `datadog.leaderElection`, `datadog.collectEvents` and `rbac.create` options to `true` in order to enable Kubernetes event collection.
By default, this Chart creates a Secret and puts an API key in that Secret.
However, you can use manually created secret by setting the `datadog.apiKeyExistingSecret` value.
### conf.d and checks.d
### confd and checksd
The Datadog [entrypoint](https://github.com/DataDog/datadog-agent/blob/master/Dockerfiles/agent/entrypoint/89-copy-customfiles.sh) copies files with a `.yaml` extension found in `/conf.d` and files with `.py` extension in `/check.d` to `/etc/datadog-agent/conf.d` and `/etc/datadog-agent/checks.d` respectively.
will copy files with a `.yaml` extension found in `/conf.d` and files with `.py` extension in
`/check.d` to `/etc/datadog-agent/conf.d` and `/etc/datadog-agent/checks.d` respectively. The keys for
`datadog.confd` and `datadog.checksd` should mirror the content found in their
respective ConfigMaps, ie
The keys for `datadog.confd` and `datadog.checksd` should mirror the content found in their respective ConfigMaps. Update your [datadog-values.yaml](values.yaml) file with the check configurations:
```yaml
datadog:
...
...
@@ -170,18 +132,17 @@ datadog:
port: 6379
```
For more details, please refer to [the documentation](https://docs.datadoghq.com/agent/kubernetes/integrations/).
### Kubernetes event collection
then upgrade your Datadog Helm chart:
To enable event collection, you will need to set the `datadog.leaderElection`, `datadog.collectEvents` and `rbac.create` options to `true`.
It is now recommended to use the Datadog Cluster Agent to collect the events - Refer to the [Enabling the Datadog Cluster Agent](#enabling-the-datadog-cluster-agent) section.
Please read [the official documentation](https://docs.datadoghq.com/agent/kubernetes/event_collection/) for more context.
For more details, please refer to [the documentation](https://docs.datadoghq.com/agent/kubernetes/integrations/).
### Kubernetes Labels and Annotations
To map Kubernetes pod labels and annotations to Datadog tags, provide a dictionary with kubernetes labels/annotations as keys and datadog tags as values:
To map Kubernetes pod labels and annotations to Datadog tags, provide a dictionary with kubernetes labels/annotations as keys and Datadog tags key as values in your [datadog-values.yaml](values.yaml) file:
As of the version 6.6.0, the Datadog Agent supports collecting metrics from any container runtime interface used in your cluster.
Configure the location path of the socket with `datadog.criSocketPath` and make sure you allow the socket to be mounted into the pod running the agent by setting `datadog.useCriSocketVolume` to `True`.
As of the version 6.6.0, the Datadog Agent supports collecting metrics from any container runtime interface used in your cluster. Configure the location path of the socket with `datadog.criSocketPath` and make sure you allow the socket to be mounted into the pod running the agent by setting `datadog.useCriSocketVolume` to `True`.
The following table lists the configurable parameters of the Datadog chart and their default values. Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
[Datadog](https://www.datadoghq.com/) is a hosted infrastructure monitoring platform.
[Datadog](https://www.datadoghq.com/) is a hosted infrastructure monitoring platform. This chart adds the Datadog Agent to all nodes in your cluster via a DaemonSet. It also optionally depends on the [kube-state-metrics chart](https://github.com/kubernetes/charts/tree/master/stable/kube-state-metrics). For more information about monitoring Kubernetes with Datadog, please refer to the [Datadog documentation website](https://docs.datadoghq.com/agent/basic_agent_usage/kubernetes/).
## Introduction
Datadog [offers two variants](https://hub.docker.com/r/datadog/agent/tags/), switch to a `-jmx` tag if you need to run JMX/java integrations. The chart also supports running [the standalone dogstatsd image](https://hub.docker.com/r/datadog/dogstatsd/tags/).
This chart adds the Datadog Agent to all nodes in your cluster via a DaemonSet. It also optionally depends on the [kube-state-metrics chart](https://github.com/kubernetes/charts/tree/master/stable/kube-state-metrics). For more information about monitoring Kubernetes with Datadog, please refer to the [Datadog documentation website](https://docs.datadoghq.com/agent/basic_agent_usage/kubernetes/).
See the [Datadog JMX integration](https://docs.datadoghq.com/integrations/java/) to learn more.
For more details of the datadog-agent v6 environment configurations, please reference the [docs](https://github.com/DataDog/datadog-agent/tree/master/Dockerfiles/agent) here.
## Prerequisites
Kubernetes 1.4+ or OpenShift 3.4+, note that:
* the Datadog Agent supports Kubernetes 1.3+
* The Datadog chart's defaults are tailored to Kubernetes 1.7.6+, see [Datadog Agent legacy Kubernetes versions documentation](https://github.com/DataDog/datadog-agent/tree/master/Dockerfiles/agent#legacy-kubernetes-versions) for adjustments you might need to make for older versions
## Quick start
By default, the Datadog Agent runs in a DaemonSet. It can alternatively run inside a Deployment for special use cases.
**Note:** simultaneous DaemonSet + Deployment installation within a single release will be deprecated in a future version, requiring two releases to achieve this.
### Installing the Datadog Chart
To install the chart with the release name `<RELEASE_NAME>`, retrieve your Datadog API key from your [Agent Installation Instructions](https://app.datadoghq.com/account/settings#agent/kubernetes) and run:
By default, this Chart creates a Secret and puts an API key in that Secret.
However, you can use manually created secret by setting the `datadog.apiKeyExistingSecret` value. After a few minutes, you should see hosts and metrics being reported in Datadog.
Because you enabled the Cluster Agent but did not provide a token, a random token was generated.
Because you enabled the Cluster Agent but did not either provide a token or a reference to an existing token via '{{ .Values.clusterAgent.tokenExistingSecret }}', a random token was generated.
This token is used to secure the communication between the Agents and the Cluster Agent.
Make sure to recreate all pods on upgrade (with the --recreate-pods flag) to ensure all
...
...
@@ -64,6 +64,23 @@ agents use the same shared token.
The datadog agent is listening on port 8126.
{{- end }}
{{- if (and (.Values.daemonset.enabled) (.Values.deployment.enabled)) }}