<p>I am trying to run a java agent. My docker file to create container:</p>
<pre><code>FROM ${my_repository}/open-jdk:1.8.0.262.b10-el_8-2020.09.15-1

ENV AGENT_HOME=/usr/local/agent
ENV AGENT_CONF=&quot;$AGENT_HOME/conf&quot;

COPY jmx_javaagent.jar $AGENT_HOME

WORKDIR $DOMAIN_ROOT

ENTRYPOINT [&quot;./start.sh&quot;]
CMD []
</code></pre>
<p>And start script addsjmx parameters to jvm parameters. As a summary in the script:</p>
<pre><code>...
java -javaagent:${AGENT_HOME}/jmx_javaagent.jar=${AGENT_PORT}:${AGENT_CONF}/config.yaml \
         -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=${JMX_REMOTE_PORT} \
      
</code></pre>
<p>When I run the image on kubernetes, I am getting :</p>
<pre><code>Failed to find Premain-Class manifest attribute in /usr/local/agent/jmx_javaagent.jar
</code></pre>
<p>So what is wrong here ?</p>

user1474111
<p>I solved the issue by using different version. In the version which I was using, I decomposed jar file and saw that there was not Premain-Class attribute. So I changed the version to the one which has this attribute and it worked.</p>
