# Dynatrace V2 Metrics API + Kubernetes - How to configure localhost V2 API endpoint?

**URL:** <https://community.dynatrace.com/t/dynatrace-v2-metrics-api-kubernetes-how-to-configure-localhost-v2-api-endpoint/32049>\
**Category:** Dynatrace API\
**Tags:** oneagent, kubernetes, dynatrace-api\
**Created:** [July 8, 2021, 3:22pm UTC](https://community.dynatrace.com/t/dynatrace-v2-metrics-api-kubernetes-how-to-configure-localhost-v2-api-endpoint/32049 "2021-07-08T15:22:17Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![steveg](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@steveg](https://community.dynatrace.com/u/steveg)\
**Post date:** [July 8, 2021, 3:22pm UTC](https://community.dynatrace.com/t/dynatrace-v2-metrics-api-kubernetes-how-to-configure-localhost-v2-api-endpoint/32049/1 "2021-07-08T15:22:17Z")

</div>

I’m trying to understand how Dynatrace One Agent is expected to be configured in a Kubernetes environment. In my case Azure (AKS).

I see One Agent deployed to each node using a Kubernetes Daemonset. Is each deployed application POD on the node expected to share and communicate with the One Agent instance deployed locally on each node or will each application POD require its own One Agent?

I’m struggling to figure out how the&nbsp;**[http://localhost:14499/metrics/ingest](http://localhost:14499/metrics/ingest)**&nbsp;endpoint is expected to work for application PODs.

---

<div class="post-metadata">

**Author:** ![MichalGebacki](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/michalgebacki/32/41585_2.png) [@MichalGebacki](https://community.dynatrace.com/u/MichalGebacki)\
**Post date:** [January 4, 2022, 2:30pm UTC](https://community.dynatrace.com/t/dynatrace-v2-metrics-api-kubernetes-how-to-configure-localhost-v2-api-endpoint/32049/2 "2022-01-04T14:30:58Z")

</div>

Hi Community, does anyone have some tips to overcome struggles mentioned above?

---

<div class="post-metadata">

**Author:** ![krook1024](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@krook1024](https://community.dynatrace.com/u/krook1024)\
**Post date:** [May 25, 2022, 11:39am UTC](https://community.dynatrace.com/t/dynatrace-v2-metrics-api-kubernetes-how-to-configure-localhost-v2-api-endpoint/32049/3 "2022-05-25T11:39:10Z")

</div>

I’m also struggling with this, has anybody made any advancements on this topic?

---

<div class="post-metadata">

**Author:** ![alefcarlos](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@alefcarlos](https://community.dynatrace.com/u/alefcarlos)\
**Post date:** [June 30, 2022, 3:37am UTC](https://community.dynatrace.com/t/dynatrace-v2-metrics-api-kubernetes-how-to-configure-localhost-v2-api-endpoint/32049/4 "2022-06-30T03:37:14Z")

</div>

Same here, I’d like to know how can I configure my PODs to call OneAgent internal apis 😞

---

<div class="post-metadata">

**Author:** ![mreider](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mreider/32/14971_2.png) [@mreider](https://community.dynatrace.com/u/mreider)\
**Post date:** [June 30, 2022, 10:24am UTC](https://community.dynatrace.com/t/dynatrace-v2-metrics-api-kubernetes-how-to-configure-localhost-v2-api-endpoint/32049/5 "2022-06-30T10:24:30Z")

</div>

The way to create a Metrics v2 endpoint inside of a Kubernetes cluster is to deploy a containerized ActiveGate using the Dynakube. You can read about this here. Notice the capabilities parameter for the ActiveGate includes a `metrics-ingest` value.

> **[DynaKube parameters for Dynatrace Operator](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/reference/dynakube-parameters)**
>
> List the available parameters for setting up Dynatrace Operator on Kubernetes.

---

<div class="post-metadata">

**Author:** ![alefcarlos](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@alefcarlos](https://community.dynatrace.com/u/alefcarlos)\
**Post date:** [June 30, 2022, 2:21pm UTC](https://community.dynatrace.com/t/dynatrace-v2-metrics-api-kubernetes-how-to-configure-localhost-v2-api-endpoint/32049/6 "2022-06-30T14:21:05Z")

</div>

[@mreider](https://community.dynatrace.com/user/7579), Hi! Thank you for the response, I tried to edit our Dynakube to add `metrics-ingest`, but this error occurs:

The DynaKube’s specification tries to use an invalid capability in ActiveGate section, invalid capability=metrics-ingest.  
Make sure you correctly specify the ActiveGate capabilities in your custom resource.

So, dynakube cr doesnt allow to edit ? I Must run the kubectl apply again ?

---

<div class="post-metadata">

**Author:** ![mreider](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mreider/32/14971_2.png) [@mreider](https://community.dynatrace.com/u/mreider)\
**Post date:** [June 30, 2022, 2:28pm UTC](https://community.dynatrace.com/t/dynatrace-v2-metrics-api-kubernetes-how-to-configure-localhost-v2-api-endpoint/32049/7 "2022-06-30T14:28:15Z")

</div>

And what version of the Dynatrace Operator are you using? (must be \> v0.4.0)

---

<div class="post-metadata">

**Author:** ![alefcarlos](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@alefcarlos](https://community.dynatrace.com/u/alefcarlos)\
**Post date:** [June 30, 2022, 2:33pm UTC](https://community.dynatrace.com/t/dynatrace-v2-metrics-api-kubernetes-how-to-configure-localhost-v2-api-endpoint/32049/8 "2022-06-30T14:33:06Z")

</div>

[@mreider](https://community.dynatrace.com/user/7579)&nbsp;where can I see what Dynatrace Operator&nbsp;version I’m using ? The docker image for operator deployment is:&nbsp;image: [docker.io/dynatrace/dynatrace-oneagent-operator:v0.10.2](http://docker.io/dynatrace/dynatrace-oneagent-operator:v0.10.2)

---

<div class="post-metadata">

**Author:** ![alefcarlos](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@alefcarlos](https://community.dynatrace.com/u/alefcarlos)\
**Post date:** [June 30, 2022, 2:36pm UTC](https://community.dynatrace.com/t/dynatrace-v2-metrics-api-kubernetes-how-to-configure-localhost-v2-api-endpoint/32049/9 "2022-06-30T14:36:08Z")

</div>

[@mreider](https://community.dynatrace.com/user/7579)&nbsp;I already found: Im using 0.3.0, so need to update my Dynatrace Operator 😉 Thank you!

---

<div class="post-metadata">

**Author:** ![cherry](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@cherry](https://community.dynatrace.com/u/cherry)\
**Post date:** [August 17, 2022, 1:54pm UTC](https://community.dynatrace.com/t/dynatrace-v2-metrics-api-kubernetes-how-to-configure-localhost-v2-api-endpoint/32049/10 "2022-08-17T13:54:07Z")

</div>

I did install dynatrace operator

[https://github.com/Dynatrace/dynatrace-operator/releases/download/v0.7.2/kubernetes.yaml](https://github.com/Dynatrace/dynatrace-operator/releases/download/v0.7.2/kubernetes.yaml)

This has installed the active gate stateful set , however when i try to navigate for /metric end point , the active gate seems not expoed.

I did add additional param of&nbsp;metrics-ingest in yaml file

---

<div class="post-metadata">

**Author:** ![jackhorner](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@jackhorner](https://community.dynatrace.com/u/jackhorner)\
**Post date:** [October 4, 2022, 1:04pm UTC](https://community.dynatrace.com/t/dynatrace-v2-metrics-api-kubernetes-how-to-configure-localhost-v2-api-endpoint/32049/11 "2022-10-04T13:04:03Z")

</div>

[@mreider](https://community.dynatrace.com/user/7579)&nbsp;i’m attempting to do the same within an EKS k8s cluster.&nbsp; i have a containerize activegate via Dynakube CRD with metrics-ingest capability specified.&nbsp; the problem is finding the documentation how to proceed from here. i can hit the k8s service endpoint for activegate via curl from another namespace/pod but get this error:

Error: 405 HTTP method POST is not supported by this URL\<br/\>Uri: /metrics/ingest

---

<div class="post-metadata">

**Author:** ![jackhorner](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@jackhorner](https://community.dynatrace.com/u/jackhorner)\
**Post date:** [October 4, 2022, 2:15pm UTC](https://community.dynatrace.com/t/dynatrace-v2-metrics-api-kubernetes-how-to-configure-localhost-v2-api-endpoint/32049/12 "2022-10-04T14:15:16Z")

</div>

given the activegate k8s service/endpoint definition, i’m trying to curl a test custom metric to:

[https://\<activegate\_svcname\>.dynatrace/metrics/ingest](https://community.dynatrace.com/)

the host and port receive the request but&nbsp;response is the 405 HTTP error mentioned above.

---

<div class="post-metadata">

**Author:** ![jackhorner](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@jackhorner](https://community.dynatrace.com/u/jackhorner)\
**Post date:** [October 4, 2022, 3:25pm UTC](https://community.dynatrace.com/t/dynatrace-v2-metrics-api-kubernetes-how-to-configure-localhost-v2-api-endpoint/32049/13 "2022-10-04T15:25:24Z")

</div>

trying a different url:

[https://\<activegate\_svcname\>.dynatrace/api/v2/metrics/ingest](https://community.dynatrace.com/)

the host receives the request but response is 404 failed to resolve tenant

---

<div class="post-metadata">

**Author:** ![gilles\_tabary](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@gilles\_tabary](https://community.dynatrace.com/u/gilles_tabary)\
**Post date:** [September 7, 2026, 2:22pm UTC](https://community.dynatrace.com/t/dynatrace-v2-metrics-api-kubernetes-how-to-configure-localhost-v2-api-endpoint/32049/14 "2026-09-07T14:22:15Z")

</div>

Hi.  
I prefered to open a new thread as opposed to prolongate this one.  
See&nbsp;[OpenShift Dynakube capability “ingest” and custom certificate ( tlsSecretName param). Any one got it to work ?](https://community.dynatrace.com/post/304154#M4018)
