Overview
If your Kubernetes cluster has Datadog deployed, the Kestrel Operator can query historical metrics, events, host information, and logs directly from the Datadog API. This enables the Kestrel AI chat agent to answer questions about performance trends, resource utilization, and historical behavior using your existing Datadog data. The Kestrel Operator auto-discovers the Datadog installation in your cluster and authenticates using the API credentials already stored in your Datadog Kubernetes secrets. No manual key configuration is required.How It Works
- Discovery — The Kestrel Operator scans the cluster for Datadog workloads (Agent DaemonSet, Cluster Agent, or Datadog Operator) across all namespaces
- Authentication — The Kestrel Operator reads the Datadog API key and Application key from the existing Kubernetes secrets created by the Datadog Helm chart or Datadog Operator
- Querying — When a user asks about metrics or performance in the Kestrel chat, the AI agent generates Datadog queries that the Kestrel Operator executes against the Datadog cloud API and returns the results
Configuration
Select Datadog as the Metrics Source when onboarding your cluster through the Kestrel Dashboard. You will be asked for the namespace where Datadog is deployed (defaults todatadog).
Alternatively, configure it directly via Helm values:
The
namespace value is used for scoped RBAC permissions. The Kestrel Operator also performs cluster-wide discovery as a fallback, so it will find Datadog even if the namespace differs from what is configured.Optional Overrides
For non-standard Datadog deployments, you can override the auto-discovery with explicit configuration:Prerequisites
Datadog Installation
The Kestrel Operator supports both common Datadog deployment patterns:- Datadog Helm Chart — DaemonSet named
datadogwith labelsapp.kubernetes.io/name=datadog - Datadog Operator — DatadogAgent custom resource managing agent DaemonSet and Cluster Agent
API Credentials
The Kestrel Operator reads credentials from the Kubernetes secrets created by your Datadog installation:- API Key (required) — Stored under the
api-keyfield in the Datadog secret - Application Key (required) — Stored under the
app-keyfield in the same secret
RBAC Permissions
Whenoperator.datadog.enabled is set to true, the Helm chart automatically creates namespace-scoped RBAC resources (Role + RoleBinding) in the Datadog namespace, granting the Kestrel Operator:
- Read access to the Datadog secrets (for API key discovery)
- List access to DaemonSets and Deployments (for Datadog workload discovery)
Supported Query Types
| Query Type | Description | Datadog API Endpoint |
|---|---|---|
| Metrics | Historical time series data (CPU, memory, network, custom metrics) | GET /api/v1/query |
| Events | Infrastructure events, alerts, and deployments | GET /api/v1/events |
| Hosts | Monitored infrastructure hosts with metadata | GET /api/v1/hosts |
| Logs | Application and infrastructure log search | POST /api/v2/logs/events/search |
Troubleshooting
Verifying Datadog Discovery
Check the Kestrel Operator logs for discovery status:Common Issues
“No Datadog workloads found in the cluster”- Verify Datadog is deployed:
kubectl get daemonset -A | grep datadog - Check the namespace is correct in the Helm values
- Check the secret exists:
kubectl get secret -n <datadog-namespace> - Verify the key name:
kubectl get secret <secret-name> -n <datadog-namespace> -o jsonpath='{.data}' | python3 -c "import sys,json; print(list(json.load(sys.stdin).keys()))"
- Verify the Datadog site matches your account region (e.g.,
us5.datadoghq.comfor US5) - Check that the Application Key has the correct scopes (API Access should be enabled)
- Confirm metrics are being collected by checking the Datadog dashboard