Unable to start APM Java Agent in WAS K8s pods

Kibana version: 8.5.2

Elasticsearch version: 8.5.2

APM Server version: 7.13.0

APM Agent language and version: apm-agent-java:1.12.0

Browser version:

Original install method (e.g. download page, yum, deb, from source, etc.) and version:
https://www.elastic.co/es/blog/using-elastic-apm-java-agent-on-kubernetes-k8s
" ### Install without modifying the application image" Method

Fresh install or upgraded from other version? Fresh install

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.

No, as far as I know

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
I've just applied a K8s manifesto to get a microservice app that run 3 java pods in WebSphere Application Servers. Allthough the volume with the agent is mounted I cant see in the pod's logs any agent running.
Is WAS compatible with this agent?
Is there any particular method to install it in WAS server

Thank you in advance and best regards.

Carlos T

Hi and thanks for asking.

How come you are using 1.12.0? It is extremely old, best if you try the latest version.

We do not officially support WAS, but this is mostly because we do not regularly test with it. We do test regularly with WebSphere Liberty though and we know there are plenty of users that use it on WAS with success, so it should work as far as I know.

Mounting that agent jar on the pod is not enough, a -javaagent instruction needs to be added somehow to the command line. We have a blog post that explains how this can be achieved. Even if it is a bit outdated, it still provide useful info.

What this blog post ends up proposing is relying on the JAVA_TOOL_OPTIONS environment variable to append -javaagent to the command line. We now have a new k8s APM attacher, still in technical preview, that does exactly that automatically by relying on the k8s mutating webhook technology. Once you realize how to use it, it would be by far the

Please go through all this material and hopefully you will figure this out.