The recommended way of deploying the Datadog Agent on a mixed cluster is to perform two installations of the Helm chart with different targetSystems.
The Datadog Agent uses a nodeSelector to automatically select Linux or Windows nodes based on targetSystem.
However, this is not the case for Kube State Metrics (which is installed by default), leading to situations where Kube State Metrics cannot be scheduled on Windows nodes.
Three options are available to avoid this issue:
Taint your Windows nodes. On Windows, the Agent always allows the node.kubernetes.io/os=windows:NoSchedule taint.
Set Kube State Metrics node selector through Datatog Helm chart values.yaml:
kube-state-metrics:
nodeSelector:
beta.kubernetes.io/os: linux // Kubernetes < 1.14
kubernetes.io/os: linux // Kubernetes >= 1.14
Deploy Kube State Metrics yourself separately by setting datadog.kubeStateMetricsEnabled to false.
Note: When using two Datadog installations (one with targetSystem: linux, one with targetSystem: windows), make sure the second one has datadog.kubeStateMetricsEnabled set to false to avoid deploying two instances of Kube State Metrics.
Some metrics are not available for Windows deployments. See available metrics.
With Cluster Agent v1.18+, a configuration with mixed clusters is supported by the Datadog Cluster Agent.
Use the following values.yaml file to configure communication between Agents deployed on Windows nodes and the Cluster Agent.
targetSystem:windowsexistingClusterAgent:join:trueserviceName:"<EXISTING_DCA_SERVICE_NAME>"# from the first Datadog Helm charttokenSecretName:"<EXISTING_DCA_SECRET_NAME>"# from the first Datadog Helm chart# Disable datadogMetrics deployment since it should have been already deployed with the first chart.datadog-crds:crds:datadogMetrics:false# Disable kube-state-metrics deploymentdatadog:kubeStateMetricsEnabled:false
HostPort is partially supported on Kubernetes, depending on the underlying OS version and CNI plugin.
Requirements to have HostPort working are the following:
Windows Server version must be >= 1909
CNI plugin must support portMappings capability
Currently, at least two CNI plugins support this capability:
Official win-bridge plugin (version >= 0.8.6) - used by GKE
Azure CNI Plugin - used by AKS
If your setup does not meet these requirements, APM and DogStatsD will only work when pod-to-pod networking is configured between the Tracer and the Agent.
Depending on your Kubernetes version, some Kubelet metrics might not be available (or Kubelet check might timeout).
For optimal experience, please use any of the following with Datadog Agent v7.19.2+: