<p>My Deployment and Pods have specific annotations:</p>

<p><strong>Deployment Annotations:</strong></p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.owners: 'owner1@example.org,owner2@example.org,owner3@example.org'
</code></pre>

<p>&nbsp;</p>

<p><strong>Pod Annotations:</strong></p>

<pre><code>metadata:
      annotations:
        pod.owners: 'owner1@example.org,owner2@example.org,owner3@example.org'
</code></pre>

<p>I cannot create labels for these because labels have a size limit of 63 characters and they do not allow special characters like ",". (<a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set</a>)</p>

<p>I have a kube-state-metrics pod which scrapes all the metrics from kube-api. However, in kube-state-metrics/metrics, I do not see the <code>deployment.owners</code> or <code>pod.owners</code> annotations anywhere. I see <code>kube_namespace_annotations</code> metric, but I do not see any annotations related to deployments or pods.</p>

<p>Are annotations information not captured by kube-state-metrics? How do I get those info?</p>

<p>Annotation information are not collected by kube-state-metrics. You can check their documentation to see which metrics are collected for the resources. Here, are link for documentation about <code>Deployment</code> and <code>Pod</code> metrics,</p>

<ol>
<li><a href="https://github.com/kubernetes/kube-state-metrics/blob/master/Documentation/deployment-metrics.md" rel="nofollow noreferrer">Deployment Metrics</a></li>
<li><a href="https://github.com/kubernetes/kube-state-metrics/blob/master/Documentation/pod-metrics.md" rel="nofollow noreferrer">Pod Metrics</a></li>
</ol>
