Configure Providers with the Datadog Operator
A provider identifies an environment or platform that needs a specific set of
customizations to the Agent configuration. A provider is warranted when the
environment imposes requirements or restrictions the defaults do not satisfy: a
managed Kubernetes service (eks, aks), a Kubernetes distribution
(openshift), a node OS without kernel sources (gke-cos), a restricted managed
environment with a workload allowlist and a fixed node OS (gke-autopilot), or a
platform-specific Agent behavior (eks-ec2-use-hostname-from-file).
Setting a provider applies that set of customizations to the Agents it covers,
whether across the whole cluster or only the nodes a
DatadogAgentProfile targets.
This page describes the supported provider model, which is distinct from
the legacy introspection feature (one DaemonSet per node
provider), which is deprecated and no longer active on the default
reconciliation path.
Provider scope
A provider applies at one of two scopes, both expressed through the single
agent.datadoghq.com/cluster-provider annotation:
- Cluster scope: set on (or detected for) the
DatadogAgent. Applies to the
whole cluster. Used for cluster-wide providers such as eks, openshift,
aks, and gke-autopilot on an Autopilot cluster. - Node scope: set on a DatadogAgentProfile
(DAP). Applies only to the subset of nodes the profile targets. Used for node
variations such as
gke-cos.
The annotation key is the same in both cases; the scope is determined by the
object it is set on.
Setting a provider
There are three ways a provider is established, in increasing order of user
intent.
Automatic detection
For cluster-scope providers, the Operator detects the provider from the labels of
the node the Operator pod runs on and applies the matching configuration
automatically. No annotation is required. Available in Operator v1.29.0+.
| Provider | Detected from node label |
|---|
eks | any eks.amazonaws.com/* or alpha.eksctl.io/* label |
aks | any kubernetes.azure.com/* label |
openshift (openshift-<os>) | node.openshift.io/os_id |
default | none of the above |
The detected provider is recorded in status.clusterProvider on the
DatadogAgent (see Effective provider resolution).
gke-cos, eks-ec2-use-hostname-from-file, and gke-autopilot are not
auto-detected; they must be declared explicitly.
On a DatadogAgent
Declare or override the cluster provider with the
agent.datadoghq.com/cluster-provider annotation on the DatadogAgent. This
mirrors the Helm chart’s providers.* configuration and is also the correction
mechanism when auto-detection cannot determine the provider.
apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
name: datadog
annotations:
agent.datadoghq.com/cluster-provider: eks
spec:
global:
credentials:
apiSecret:
secretName: datadog-secret
keyName: api-key
On a DatadogAgentProfile
Declare a node-scope provider by setting the same annotation on a
DatadogAgentProfile. The value
is propagated to the DaemonSet the profile generates and applies only to the
nodes the profile’s profileAffinity selects.
This is safe only if profileAffinity correctly selects the nodes that match
the declared provider. The Operator does not verify that the selected nodes
match the annotation.
apiVersion: datadoghq.com/v1alpha1
kind: DatadogAgentProfile
metadata:
name: gke-cos-profile
annotations:
agent.datadoghq.com/cluster-provider: gke-cos
spec:
profileAffinity:
profileNodeAffinity:
- key: cloud.google.com/gke-os-distribution
operator: In
values:
- cos
Effective provider resolution
When more than one source could supply a provider, the Operator resolves the
effective value by source:
- A user-specified value (annotation on the
DatadogAgent, or on a
DatadogAgentProfile for its node subset) always wins. - Otherwise the auto-detected value is used.
The resolved value is recorded in the DatadogAgent status:
status:
clusterProvider: eks
conditions:
- type: ClusterProviderDetected
status: "True"
reason: ProviderDetected # or "UserSpecified" when set via annotation
message: Cluster provider detected as "eks".
Supported providers
The following is the exhaustive list of provider values the Operator acts on. All
values are the value of the agent.datadoghq.com/cluster-provider annotation.
| Provider | Scope | Resolution | Effect | Helm equivalent |
|---|
gke-cos | Cluster (DDA) or Node (DAP) | Annotation only | Drops the /usr/src volume from the OOM Kill, TCP Queue Length, and GPU checks (node OS has no kernel sources) | providers.gke.cos |
eks-ec2-use-hostname-from-file | Cluster (DDA) or Node (DAP) | Annotation only | Adds DD_HOSTNAME_FILE and a host mount of the cloud-init instance-id file so the Agent derives a stable hostname | providers.eks.ec2.useHostnameFromFile |
eks | Cluster (DDA) | Detection or annotation | Enables control plane monitoring: API Server, Controller Manager, Scheduler | providers.eks.controlPlaneMonitoring |
openshift (openshift-<os>) | Cluster (DDA) | Detection or annotation | Enables control plane monitoring: API Server, Controller Manager, Scheduler, and etcd | providers.openshift.controlPlaneMonitoring |
aks | Cluster (DDA) | Detection or annotation | Sets the mandatory DD_ADMISSION_CONTROLLER_ADD_AKS_SELECTORS=true environment variable on the Cluster Agent | providers.aks.enabled |
gke-autopilot | Cluster (DDA) | Annotation only | Full GKE Autopilot workload adaptation (volume, env var, path, image, and PriorityClass changes). See Datadog Operator on GKE Autopilot | providers.gke.autopilot |
windows | Node (DAP) | Annotation only | Builds a Windows-compatible node Agent DaemonSet on the targeted Windows nodes: Linux-only containers, mounts, and security context are stripped, and a Windows base image and init config are applied. Available in Operator v1.30.0+ | None |
Cluster scope applies the provider to every node, so use it only when all nodes match the provider (for example, a cluster where every node runs Container-Optimized OS). Otherwise, set the provider on a DAP that targets the matching nodes.
Examples
- Cluster-wide, auto-detected: an EKS cluster gets
eks from detection and
enables control plane monitoring with no user
configuration. - Cluster-wide, declared: set
agent.datadoghq.com/cluster-provider: aks on
the DatadogAgent to apply the required AKS admission controller selectors. - Node OS variation: set
agent.datadoghq.com/cluster-provider: gke-cos on a
DAP that targets the COS node pool. - Granular behavior: set
agent.datadoghq.com/cluster-provider: eks-ec2-use-hostname-from-file on a DAP
targeting EC2 nodes that need file-based hostname resolution. - Restricted managed environment: set
agent.datadoghq.com/cluster-provider: gke-autopilot on the DatadogAgent for
an Autopilot cluster (see the GKE Autopilot guide).