<p>I am using <strong>DirectXMan12/k8s-prometheus-adapte</strong> to push the external metric from Prometheus to Kubernetes.</p>

<p>After pushing the external metric how can I verify the data is k8s?</p>

<p>When I hit <strong>kubectl get --raw /apis/external.metrics.k8s.io/v1beta1 | jq</strong> I got the following result but after that, I do not have an idea how to fetch actual metrics value</p>

<pre><code>{
  "kind": "APIResourceList",
  "apiVersion": "v1",
  "groupVersion": "external.metrics.k8s.io/v1beta1",
  "resources": [
   {
     "name": "subscription_back_log",
     "singularName": "",
     "namespaced": true,
     "kind": "ExternalMetricValueList",
     "verbs": [
       "get"
     ]
  }]
}
</code></pre>

Ravi Shah
<p>The metric is namespaced, so you will need to add the namespace into the URL. Contrary to what the other answer suggests, I believe you don't need to include pods into the URL. This is an external metric. External metrics are not associated to any kubernetes object, so only the namespace should suffice:</p>
<ul>
<li><code>/apis/external.metrics.k8s.io/v1beta1/namespaces/&lt;namespace&gt;/&lt;metric_name&gt;</code></li>
</ul>
<p>Here's an example that works for me, using an external metric in my setup:</p>
<pre><code>$ kubectl get --raw /apis/external.metrics.k8s.io/v1beta1 | jq                                               
{
  &quot;kind&quot;: &quot;APIResourceList&quot;,
  &quot;apiVersion&quot;: &quot;v1&quot;,
  &quot;groupVersion&quot;: &quot;external.metrics.k8s.io/v1beta1&quot;,
  &quot;resources&quot;: [
    {
      &quot;name&quot;: &quot;redis_key_size&quot;,
      &quot;singularName&quot;: &quot;&quot;,
      &quot;namespaced&quot;: true,
      &quot;kind&quot;: &quot;ExternalMetricValueList&quot;,
      &quot;verbs&quot;: [
        &quot;get&quot;
      ]
    }
  ]
}
</code></pre>
<pre><code>$ kubectl get --raw /apis/external.metrics.k8s.io/v1beta1/namespaces/default/redis_key_size

{
  &quot;kind&quot;: &quot;ExternalMetricValueList&quot;,
  &quot;apiVersion&quot;: &quot;external.metrics.k8s.io/v1beta1&quot;,
  &quot;metadata&quot;: {},
  &quot;items&quot;: [
    {
      &quot;metricName&quot;: &quot;redis_key_size&quot;,
      &quot;metricLabels&quot;: {
        &quot;key&quot;: &quot;...&quot;
      },
      &quot;timestamp&quot;: &quot;2021-10-07T09:00:01Z&quot;,
      &quot;value&quot;: &quot;0&quot;
    },
    ...
  ]
}
</code></pre>
