<p>This might be rookie question. I am not well versed with kubernetes. I added this to my <code>deployment.yaml</code></p>
<pre><code>ad.datadoghq.com/helm-chart.check_names: |
          [&quot;openmetrics&quot;]
ad.datadoghq.com/helm-chart.init_configs: |
          [{}]
ad.datadoghq.com/helm-chart.instances: |
          [
            {
              &quot;prometheus_url&quot;: &quot;http://%%host%%:7071/metrics&quot;,
              &quot;namespace&quot;: &quot;custom-metrics&quot;,
              &quot;metrics&quot;: [ &quot;jvm*&quot; ]
            }
          ]
</code></pre>
<p>But I get this error</p>
<pre><code>error validating data: [ValidationError(Deployment.spec.template.metadata): unknown field &quot;ad.datadoghq.com/helm-chart.check_names&quot; in io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta, ValidationError(Deployment.spec.template.metadata)
</code></pre>
<p>What does this error mean? Does it mean that I need to define <code>ad.datadoghq.com/helm-chart.check_names</code> somewhere? If so, where?</p>

Ashwin
<p>You are probably adding this in a wrong place - according to your error messages - you're adding this to <code>Deployment.spec.template.metadata</code></p>
<p>you can check <a href="https://github.com/DataDog/helm-charts/blob/959c136e87599d0a6ce6f09031677745511d0d08/charts/datadog-operator/templates/deployment.yaml#L29" rel="nofollow noreferrer">official helm deployment template</a> and <a href="https://www.datadoghq.com/blog/monitoring-kubernetes-with-datadog/#deploy-the-cluster-agent" rel="nofollow noreferrer">this example on documentation</a> - values such <code>ad.datadoghq.com/helm-chart.check_names</code> are annotations, so these needs to be defined under path <code>Deployment.spec.template.metadata.annotations</code></p>
<blockquote>
<p><strong>annotations</strong>: a map of string keys and values that can be used by
external tooling to store and retrieve arbitrary metadata about this
object
(see <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/" rel="nofollow noreferrer">the annotations docs</a>)</p>
</blockquote>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: datadog-cluster-agent
  namespace: default
spec:
  selector:
    matchLabels:
      app: datadog-cluster-agent
  template:
    metadata: # &lt;- not directly under 'metadata'
      labels:
        app: datadog-cluster-agent
      name: datadog-agent
      annotations: # &lt;- add here
        ad.datadoghq.com/datadog-cluster-agent.check_names: '[&quot;prometheus&quot;]'
        ad.datadoghq.com/datadog-cluster-agent.init_configs: '[{}]'
        ad.datadoghq.com/datadog-cluster-agent.instances: '[{&quot;prometheus_url&quot;: &quot;http://%%host%%:5000/metrics&quot;,&quot;namespace&quot;: &quot;datadog.cluster_agent&quot;,&quot;metrics&quot;: [&quot;go_goroutines&quot;,&quot;go_memstats_*&quot;,&quot;process_*&quot;,&quot;api_requests&quot;,&quot;datadog_requests&quot;,&quot;external_metrics&quot;, &quot;cluster_checks_*&quot;]}]'
    spec:
</code></pre>
