Deploy OneAgent on Kubernetes for application-only monitoring

To deploy OneAgent on Kubernetes for application-only monitoring, read the instructions below.

Before you begin

You'll need to

When deployed in application-only mode, OneAgent only monitors the memory of the processes within the container, and not the total memory of the container.

Generate PaaS token

The first step is to get your environment ID and PaaS token for your Dynatrace environment.

Integrate OneAgent into your application

The following steps explain how to integrate OneAgent with Kubernetes applications.

You have two integration options:

  • Integrate at container build time.
  • Integrate at container run time.

The build time integration consists of two steps:

  1. Integrate OneAgent to the application image.
  2. Build the application image.

Integrate OneAgent into the application image

Build your application image

Build the Docker image from your Dockerfile to use it in your Kubernetes environment:

$ docker build -t yourapp .

Note: You can monitor your application containers with a different Dynatrace environment. To do this, read the instructions below:

Configure a proxy address (optional)

In case you run an environment with proxy, you need to set the DT_PROXY environment variable in the application container to pass the proxy credentials to OneAgent.

Note: You might need to update the wget shipped with the Alpine image to allow for proxy authentication for the download of OneAgent (see for more information).