# Load balancing for dynakube apiUrl parameter

**URL:** <https://community.dynatrace.com/t/load-balancing-for-dynakube-apiurl-parameter/47433>\
**Category:** Dynatrace Managed\
**Tags:** managed-cluster, kubernetes\
**Created:** [September 2, 2024, 1:22pm UTC](https://community.dynatrace.com/t/load-balancing-for-dynakube-apiurl-parameter/47433 "2024-09-02T13:22:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkulov](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mkulov/32/11732_2.png) [@mkulov](https://community.dynatrace.com/u/mkulov)\
**Post date:** [September 2, 2024, 1:22pm UTC](https://community.dynatrace.com/t/load-balancing-for-dynakube-apiurl-parameter/47433/1 "2024-09-02T13:22:27Z")

</div>

Hi,

We have a three node cluster with the following nodes:

dtnode01 10.0.0.101

dtnode02 10.0.0.102

dtnode03 10.0.0.103

In our dynakube xml file we have specified apiUrl to point to [https://dtnode01/api](https://dtnode01/api).

However when dtnode01 is down during maintenance we observed that monitoring data is lost.

We would expect that the load balancing will kick off and data will be sent to dtnode02 and dtnode03.

Do we need to specify load balancing url for the API something like [https://dtcluster/api](https://dtcluster/api) in order to recover when first node&nbsp;[https://dtnode01/api](https://dtnode01/api)&nbsp;is down?

---

<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 2, 2024, 2:20pm UTC](https://community.dynatrace.com/t/load-balancing-for-dynakube-apiurl-parameter/47433/2 "2024-09-02T14:20:02Z")

</div>

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

Do you use Environment Active Gates or do you use direct connection to the DT nodes?

Maybe you should use containerized Environment AG to proxy the data for the DT nodes.

> **[Managed deployments](https://docs.dynatrace.com/managed/managed-cluster/basics/managed-deployments)**
>
> Understand how Dynatrace Managed deployments evolve from a basic internal setup to a globally distributed high-availability architecture.

I hope it helps.

Best regards,

Mizső

---

<div class="post-metadata">

**Author:** ![mkulov](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mkulov/32/11732_2.png) [@mkulov](https://community.dynatrace.com/u/mkulov)\
**Post date:** [September 2, 2024, 2:45pm UTC](https://community.dynatrace.com/t/load-balancing-for-dynakube-apiurl-parameter/47433/3 "2024-09-02T14:45:53Z")

</div>

Hi&nbsp;[@Mizső](https://community.dynatrace.com/user/47783)&nbsp;,

we use the environment AG that is deployed by the operator.

How is this related to my question on setting the value for apiUrl and resolving the scenario when this node goes down?

---

<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 2, 2024, 2:53pm UTC](https://community.dynatrace.com/t/load-balancing-for-dynakube-apiurl-parameter/47433/4 "2024-09-02T14:53:24Z")

</div>

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

Sorry I have not red your post carefully.

At my clients (where there are 3 or 5 cluster nodes) we use&nbsp;load balancing url in the custom resource yaml.

Best regards,

Mizső

---

<div class="post-metadata">

**Author:** ![mkulov](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mkulov/32/11732_2.png) [@mkulov](https://community.dynatrace.com/u/mkulov)\
**Post date:** [September 3, 2024, 8:05am UTC](https://community.dynatrace.com/t/load-balancing-for-dynakube-apiurl-parameter/47433/5 "2024-09-03T08:05:38Z")

</div>

Hi&nbsp;[@Mizső](https://community.dynatrace.com/user/47783)&nbsp;,

Thanks for getting back.

In such case I assume that the API will return the list of nodes which are part of the cluster.

So that the agents and AG will communicate with the provides cluster nodes and the monitoring traffic will not go to the load balancing url.

Is this correct assumption?

---

<div class="post-metadata">

**Author:** ![PacoPorro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pacoporro/32/36087_2.png) [@PacoPorro](https://community.dynatrace.com/u/PacoPorro)\
**Post date:** [September 16, 2024, 7:28am UTC](https://community.dynatrace.com/t/load-balancing-for-dynakube-apiurl-parameter/47433/6 "2024-09-16T07:28:30Z")

</div>

Hi&nbsp;[@mkulov](https://community.dynatrace.com/user/39837)

Each cluster gets a dedicated web domain (subdomain of&nbsp;[dynatrace-managed.com](http://dynatrace-managed.com)) and a trusted SSL certificate. You can use this domain instead of the node names.

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [September 20, 2024, 12:47pm UTC](https://community.dynatrace.com/t/load-balancing-for-dynakube-apiurl-parameter/47433/7 "2024-09-20T12:47:54Z")

</div>

Hello&nbsp;[@mkulov](https://community.dynatrace.com/user/39837)

- Regarding K8s configurations, refer the attached URL to K8s team:&nbsp;[Services, Load Balancing, and Networking | Kubernetes](https://kubernetes.io/docs/concepts/services-networking/)
- Dynakube custom resource:&nbsp;[Custom Resources | Kubernetes](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/)
- [DynaKube parameters for Dynatrace Operator](https://docs.dynatrace.com/managed/setup-and-configuration/setup-on-k8s/reference/dynakube-parameters#dynakube-parameters-for-dynatrace-operator)

Regards,

Peter
