# Kubernetes monitoring activegate configuration

**URL:** <https://community.dynatrace.com/t/kubernetes-monitoring-activegate-configuration/36630>\
**Category:** Container platforms\
**Tags:** kubernetes\
**Created:** [September 23, 2022, 4:50am UTC](https://community.dynatrace.com/t/kubernetes-monitoring-activegate-configuration/36630 "2022-09-23T04:50:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thitiphans](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@thitiphans](https://community.dynatrace.com/u/thitiphans)\
**Post date:** [September 23, 2022, 4:50am UTC](https://community.dynatrace.com/t/kubernetes-monitoring-activegate-configuration/36630/1 "2022-09-23T04:50:14Z")

</div>

Hi right now when deploy agent using operator.&nbsp;[document here](https://www.dynatrace.com/support/help/setup-and-configuration/setup-on-container-platforms/kubernetes/get-started-with-kubernetes-monitoring)

this will create new activegate for k8s and use it.

but I want to use existing active gate where and how I should config.

currently I try change custom resource on apiurl but it didn’t work

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [September 23, 2022, 6:15am UTC](https://community.dynatrace.com/t/kubernetes-monitoring-activegate-configuration/36630/2 "2022-09-23T06:15:34Z")

</div>

Hi&nbsp;[@thitiphans](https://community.dynatrace.com/user/50925),

As far as I know you have two options.

1. Use the containerized active gate (one or more - scale up in the dynakube resouce yaml)

2. Use the existing active gates by comment out the active gate in the&nbsp; dynakube resource yaml

I guess you can’t use together.&nbsp;☹️

Br, Mizső

---

<div class="post-metadata">

**Author:** ![thitiphans](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@thitiphans](https://community.dynatrace.com/u/thitiphans)\
**Post date:** [September 23, 2022, 6:26am UTC](https://community.dynatrace.com/t/kubernetes-monitoring-activegate-configuration/36630/3 "2022-09-23T06:26:09Z")

</div>

Thank you for your reply.

What I planned to do is use only existing activegate.

You mention that need to comment out dynakube yml file is it “routing” line?

Currently there is active gate which on public subnet but I want to monitor k8s which in private subnet can’t connect to public internet.

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [September 23, 2022, 7:22am UTC](https://community.dynatrace.com/t/kubernetes-monitoring-activegate-configuration/36630/4 "2022-09-23T07:22:41Z")

</div>

If you have the activegate section in the cr.yaml but don’t wan’t an AG deployed just delete or comment out the entire section.

If you have an external AG that the agents can reach they will use it for routing automatically.

For the k8s API integration with an non operator AG follow this:

> **[Deploy ActiveGate in a VM](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/deployment/other/ag-in-vm)**
>
> Set up and configure an ActiveGate for Kubernetes platform monitoring in a virtual machine.

You can also use the operator AG just for traffic routing and not the API integration. In that case leave the activegate section in the CR but make sure the annotation mentioned here is not set:

> **[Kubernetes API Monitoring](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/guides/deployment-and-configuration/monitoring-and-instrumentation/k8s-api-monitoring)**
>
> Monitor the Kubernetes API using Dynatrace

You can also remove the&nbsp; - kubernetes-monitoring capability.
