@@ -411,6 +411,66 @@ field#status.conditions.HorizontalAbleToScale.status:"False"
411411
412412<div class="alert alert-info">You can select up to 50 fields per resource. You can use the preview to validate your indexing choices.</div>
413413
414+ # ## Collect custom resource metrics using Kubernetes State Core check
415+
416+ **Note**: This functionality requires Cluster Agent 7.63.0+
417+
418+ It is possible to use the kubernetes_state_core check to collect custom resource metrics when running Cluster Agent.
419+
420+ {{< tabs >}}
421+ {{% tab "Helm Chart" %}}
422+
423+ 1. Add the following configuration to `datadog-values.yaml` :
424+
425+ ` ` ` yaml
426+ datadog:
427+ #(...)
428+ kubeStateMetricsCore:
429+ collectCrMetrics:
430+ - <CUSTOM_RESOURCE_NAME>
431+ ` ` `
432+
433+ 1. Upgrade your Helm chart :
434+
435+ ```
436+ helm upgrade -f datadog-values.yaml <RELEASE_NAME> datadog/datadog
437+ ```
438+
439+ {{% /tab %}}
440+ {{% tab "Datadog Operator" %}}
441+
442+ 1. Install the Datadog Operator with an option that grants the Datadog Agent permission to collect custom resources :
443+
444+ ```
445+ helm install datadog-operator datadog/datadog-operator --set clusterRole.allowReadAllResources=true
446+ ```
447+
448+ 1. Add the following configuration to your `DatadogAgent` manifest, `datadog-agent.yaml` :
449+
450+ ` ` ` yaml
451+ apiVersion: datadoghq.com/v2alpha1
452+ kind: DatadogAgent
453+ metadata:
454+ name: datadog
455+ spec:
456+ #(...)
457+ features:
458+ kubeStateMetricsCore:
459+ collectCrMetrics:
460+ - <CUSTOM_RESOURCE_NAME>
461+ ` ` `
462+
463+ 1. Apply your new configuration :
464+
465+ ```
466+ kubectl apply -n $DD_NAMESPACE -f datadog-agent.yaml
467+ ```
468+
469+ {{% /tab %}}
470+ {{< /tabs >}}
471+
472+ For full description of `collectCrMetrics` item see : https://github.com/kubernetes/kube-state-metrics/blob/main/docs/metrics/extend/customresourcestate-metrics.md.
473+
414474
415475# # Further reading
416476
@@ -420,4 +480,3 @@ field#status.conditions.HorizontalAbleToScale.status:"False"
420480[2] : /infrastructure/containers
421481[3] : https://app.datadoghq.com/orchestration/explorer/pod
422482[4] : https://app.datadoghq.com/orchestration/explorer/crd
423-
0 commit comments