Adding the APM Insight Java agent in a Kubernetes environment
There are three methods for installing the APM Insight Java agent in a Kubernetes environment.
Prerequisites
- Log in to Site24x7.
- Go to APM > APM Insight > Applications and click the Java icon.
- Click Download to obtain the APM Insight Java agent ZIP file (apminsight-javaagent.zip).
- Extract the ZIP file and locate the agent's JAR and configuration files.
- Open the apminsight.conf file in any text editor and include the license.key, application.name, and proxy details.
Adding the APM Insight Java agent via a Docker container
Follow the steps below to install the Java agent in a Docker container:
- Place all the agent files in the same local directory where your Dockerfile is located.
- Open the Dockerfile with any text editor, and copy all the APM Insight Java agent files to a directory inside the target container.
- Add -javaagent:[absolute_path_of_agent_jar]/apminsight-javaagent.jar (Java argument) to the startup command.
- Use the updated Dockerfile to create your container image.
- Once the image is ready, start your application by spawning containers using the Docker image you created.
- Once the application is up and receiving requests, view the monitor under APM > APM Insight > Applications.
Adding the APM Insight Java agent in Kubernetes via Init Containers
These steps guide you through the process of integrating the APM Insight Java agent into your Kubernetes deployment using Init Containers.
- Create a secret for the Site24x7 license key in your application namespace.
- Create an empty volume that will be used to copy the agent files during the InitContainers process.
- Include the InitContainers command in your Helm chart or deployment YAML file to copy agent files from the Site24x7 image to your volume.
- Mount the volume created in Step 2 into your application container.
- Include the environment variables (S247_LICENSE_KEY and JAVA_TOOL_OPTIONS) in the application deployment YAML file.
Adding APM Insight Java agent in Kubernetes via Persistent Volumes
This explains how to set up the APM Insight Java agent for applications running in Kubernetes using Persistent Volumes.
- Create a Persistent Volume and copy all agent files into it.
- Mount the volume into the application container.
- Create a secret for the Site24x7 license key in your application namespace.
- Include the environment variables (S247_LICENSE_KEY and JAVA_TOOL_OPTIONS) in the application deployment YAML file.
Related articles
How to install various APM Insight agents in a Docker container
Java | .NET | PHP | Node.js | Python
How to install various APM Insight agents in a Kubernetes environment
.NET | PHP | Node.js | Python