<p>I have dockerize the microservice app and now using Kubernetes.</p>

<p>Sometimes container is running in <code>healthy</code> state but there is a problem in microservice app so I have to get the app metrics.</p>

<p>Is it possible to get the metrics from outside the container/pod?</p>

HARINI NATHAN
<p>I would suggest designing your application using the Observability patter, basically, you will create a path, <code>/metrics</code> for example, and you will hit this path every time you need the application's info. The path is populated of all the information you need (killed threads for example)   This approach could be called <code>withe box monitoring</code>: the application knows his status. Then you can either use tools like Prometheus to query the path and create alerts or just hit the path retrieving information which are exposed in the format you want to (json, yml, ecc). The path will be reached using a simple web server, may be integrated into the application as well. Exposing the container port <code>80</code> you can basically run a simple <code>curl http://&lt;container name | localhost&gt;/metrics</code> getting all the information you need. 
You can find a bunch of library you can integrate into your application.</p>
